2010-01-13 13:44:58 +00:00
|
|
|
--TEST--
|
|
|
|
Bug #49847 (exec() fails on lines larger then 4095 bytes)
|
|
|
|
--FILE--
|
|
|
|
<?php
|
2010-01-25 13:49:47 +00:00
|
|
|
$iswin = substr(PHP_OS, 0, 3) == "WIN";
|
|
|
|
|
|
|
|
if ($iswin) {
|
|
|
|
$f = dirname(__FILE__) . '\\bug49847.tmp';
|
|
|
|
$s = str_repeat(' ', 4097);
|
|
|
|
$s .= '1';
|
|
|
|
file_put_contents($f, $s);
|
|
|
|
exec('more ' . $f, $output);
|
|
|
|
} else {
|
|
|
|
exec("printf %4098d 1", $output);
|
|
|
|
}
|
2010-01-13 13:44:58 +00:00
|
|
|
var_dump($output);
|
2010-01-25 13:49:47 +00:00
|
|
|
if ($iswin) {
|
|
|
|
unlink($f);
|
|
|
|
}
|
2010-01-13 13:44:58 +00:00
|
|
|
?>
|
2010-01-25 13:49:47 +00:00
|
|
|
--EXPECTF--
|
2010-01-13 13:44:58 +00:00
|
|
|
array(1) {
|
|
|
|
[0]=>
|
2010-01-25 13:49:47 +00:00
|
|
|
string(4098) "%s 1"
|
2010-01-13 13:44:58 +00:00
|
|
|
}
|