3v4l.org

run code in 300+ PHP versions simultaneously
<?php $age = array("Peter"=>"35", "Ben"=>"37", "Joe"=>"43"); $arr = array("p", "B" ,"J"); print_r($age); foreach ($arr as $x => $x_value) { echo $x; } $file = get_file_contents("http://google.com"); echo $file;
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.7
Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 ) 012 Fatal error: Uncaught Error: Call to undefined function get_file_contents() in /in/dp9ko:9 Stack trace: #0 {main} thrown in /in/dp9ko on line 9
Process exited with code 255.
Output for 5.6.38
Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 ) 012 Fatal error: Call to undefined function get_file_contents() in /in/dp9ko on line 9
Process exited with code 255.

preferences:
161.43 ms | 401 KiB | 218 Q