2013-04-20 07:23:49 +00:00
|
|
|
--TEST--
|
|
|
|
Bug #64677 (execution operator `` stealing surrounding arguments)
|
|
|
|
--FILE--
|
|
|
|
<?PHP
|
|
|
|
class cat {
|
2020-02-03 21:52:20 +00:00
|
|
|
public function show_output($prepend, $output = '') {
|
|
|
|
}
|
2013-04-20 07:23:49 +00:00
|
|
|
}
|
|
|
|
$cat = new cat();
|
2020-11-30 15:45:48 +00:00
|
|
|
$cat->show_output('Files: ', trim((string) `cd .`)); // this gives invalid args to shell_exec
|
2013-04-20 07:23:49 +00:00
|
|
|
$cat->show_output('Files: ', `cd .`); // this causes a segmentation fault
|
|
|
|
$cat->show_output(`cd .`); // this causes a segmentation fault
|
|
|
|
|
|
|
|
function show_outputa($prepend, $output) {
|
2020-02-03 21:52:20 +00:00
|
|
|
echo "Okey";
|
2013-04-20 07:23:49 +00:00
|
|
|
}
|
|
|
|
show_outputa('Files: ', `cd .`); // this works as expected
|
|
|
|
|
|
|
|
?>
|
|
|
|
--EXPECT--
|
|
|
|
Okey
|