Edit report at https://bugs.php.net/bug.php?id=64677&edit=1
ID: 64677 Patch added by: larue...@php.net Reported by: knivey at botops dot net Summary: execution operator `` stealing surrounding arguments Status: Open Type: Bug Package: Scripting Engine problem Operating System: Ubuntu 12.04LTS PHP Version: 5.5.0beta3 Block user comment: N Private report: N New Comment: The following patch has been added/updated: Patch Name: bug64677.diff Revision: 1366441202 URL: https://bugs.php.net/patch-display.php?bug=64677&patch=bug64677.diff&revision=1366441202 Previous Comments: ------------------------------------------------------------------------ [2013-04-20 04:41:18] knivey at botops dot net Description: ------------ When used the execution operator ` as an argument passed to a class method, you will end up with a seg fault or invalid args to shell_exec error Test script: --------------- <?PHP class cat { public function show_output($prepend, $output = '') {echo $prepend . $output;} public function show_out($output) {echo $output;} } $cat = new cat(); $cat->show_output('Files: ', trim(`ls`)); // this gives invalid args to shell_exec $cat->show_output('Files: ', `ls`); // this causes a segmentation fault $cat->show_out(`ls`); // this causes a segmentation fault function show_outputa($prepend, $output) {echo $prepend . $output;} show_outputa('Files: ', `ls`); // this works as expected ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=64677&edit=1