3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo file_get_contents(__FILE__); echo PHP_EOL . '=============' . PHP_EOL; system('who');
based on cMibm
Output for 5.4.39 - 5.4.42, 5.4.44 - 5.6.28, 7.0.0 - 7.1.0
<?php echo file_get_contents(__FILE__); echo PHP_EOL . '=============' . PHP_EOL; system('who'); =============
Output for hhvm-3.10.0 - 3.12.0
<?php echo file_get_contents(__FILE__); echo PHP_EOL . '=============' . PHP_EOL; system('who'); ============= Failed to exec: `who'
Output for 5.4.43
<?php echo file_get_contents(__FILE__); echo PHP_EOL . '=============' . PHP_EOL; system('who'); ============= Warning: system(): Unable to fork [who] in /in/S5KSu on line 4
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.4.38
<?php echo file_get_contents(__FILE__); echo PHP_EOL . '=============' . PHP_EOL; system('who'); ============= sh: 1: who: not found
Output for 4.3.1 - 4.3.9, 5.0.0 - 5.0.1
<?php echo file_get_contents(__FILE__); echo PHP_EOL . '=============' . PHP_EOL; system('who'); Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/S5KSu on line 3 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/S5KSu on line 3 PHP_EOL=============PHP_EOLsh: 1: who: not found
Output for 4.3.0
<?php echo file_get_contents(__FILE__); echo PHP_EOL . '=============' . PHP_EOL; system('who'); Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/S5KSu on line 3 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/S5KSu on line 3 PHP_EOL=============PHP_EOL