3v4l.org

run code in 300+ PHP versions simultaneously
<?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
Output for git.master, git.master_jit, rfc.property-hooks
Warning: shell_exec(): Unable to execute 'ls' in /in/sPht8 on line 7 Files: Warning: shell_exec(): Unable to execute 'ls' in /in/sPht8 on line 8 Files: Warning: shell_exec(): Unable to execute 'ls' in /in/sPht8 on line 9 Warning: shell_exec(): Unable to execute 'ls' in /in/sPht8 on line 12 Files:

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
41.77 ms | 401 KiB | 8 Q