3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo '<pre>'; // Outputs all the result of shellcommand "ls", and returns // the last output line into $last_line. Stores the return value // of the shell command in $retval. $last_line = system('ls', $retval); // Printing additional info echo ' </pre> <hr />Last line of the output: ' . $last_line . ' <hr />Return value: ' . $retval; ?>
Output for 4.3.0 - 5.6.28, 7.0.0 - 7.1.0
<pre> </pre> <hr />Last line of the output: <hr />Return value: 127
Output for hhvm-3.10.0 - 3.12.0
<pre>Failed to exec: `ls' </pre> <hr />Last line of the output: Failed to exec: `ls' <hr />Return value: 1