3v4l.org

run code in 200+ 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('pwd', $retval); // Printing additional info echo ' </pre> <hr />Last line of the output: ' . $last_line . ' <hr />Return value: ' . $retval;
Output for 4.3.0, 5.4.42 - 7.2.0
<pre> </pre> <hr />Last line of the output: <hr />Return value: 127
Output for 5.2.3 - 5.3.6, 5.3.8 - 5.4.41
<pre>/ </pre> <hr />Last line of the output: / <hr />Return value: 0
Output for 4.4.7, 5.3.7

Process exited with code 137.
Output for 4.3.1 - 4.4.6, 4.4.8 - 5.2.2
<pre>/in </pre> <hr />Last line of the output: /in <hr />Return value: 0