bug64677.phpt 559 B

123456789101112131415161718192021
  1. --TEST--
  2. Bug #64677 (execution operator `` stealing surrounding arguments)
  3. --FILE--
  4. <?PHP
  5. class cat {
  6. public function show_output($prepend, $output = '') {
  7. }
  8. }
  9. $cat = new cat();
  10. $cat->show_output('Files: ', trim((string) `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. function show_outputa($prepend, $output) {
  14. echo "Okey";
  15. }
  16. show_outputa('Files: ', `cd .`); // this works as expected
  17. ?>
  18. --EXPECT--
  19. Okey