xref: /PHP-7.2/Zend/tests/bug64677.phpt (revision 6ed16753)
1--TEST--
2Bug #64677 (execution operator `` stealing surrounding arguments)
3--FILE--
4<?PHP
5class cat {
6	public function show_output($prepend, $output = '') {
7	}
8}
9$cat = new cat();
10$cat->show_output('Files: ', trim(`cd .`)); // this gives invalid args to shell_exec
11$cat->show_output('Files: ', `cd .`); // this causes a segmentation fault
12$cat->show_output(`cd .`); // this causes a segmentation fault
13
14function show_outputa($prepend, $output) {
15	echo "Okey";
16}
17show_outputa('Files: ', `cd .`); // this works as expected
18
19?>
20--EXPECT--
21Okey
22