3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url="http://fbclaurel.onthecity.org/plaza/events?format=json"; $data = file_get_contents($url); $json = json_decode($data); //echo '<pre>'; //print_r( $json[0]->global_event); array_walk_recursive($json[0]->global_event, function ($v,$k){ echo 'KEY :'.$v.' & Value :'.$k.'<br>'; });
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for fbclaurel.onthecity.org failed: System error in /in/8lJlW on line 5 Warning: file_get_contents(http://fbclaurel.onthecity.org/plaza/events?format=json): Failed to open stream: php_network_getaddresses: getaddrinfo for fbclaurel.onthecity.org failed: System error in /in/8lJlW on line 5 Fatal error: Uncaught Error: Attempt to modify property "global_event" on null in /in/8lJlW:11 Stack trace: #0 {main} thrown in /in/8lJlW on line 11
Process exited with code 255.
Output for 8.0.13 - 8.0.30
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/8lJlW on line 5 Warning: file_get_contents(http://fbclaurel.onthecity.org/plaza/events?format=json): Failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/8lJlW on line 5 Fatal error: Uncaught Error: Attempt to modify property "global_event" on null in /in/8lJlW:11 Stack trace: #0 {main} thrown in /in/8lJlW on line 11
Process exited with code 255.
Output for 8.0.0 - 8.0.12
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/8lJlW on line 5 Warning: file_get_contents(http://fbclaurel.onthecity.org/plaza/events?format=json): Failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/8lJlW on line 5 Fatal error: Uncaught Error: Attempt to modify property "global_event" on null in /in/8lJlW:11 Stack trace: #0 {main} thrown in /in/8lJlW on line 11
Process exited with code 255.
Output for 7.4.0 - 7.4.1, 7.4.26 - 7.4.33
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/8lJlW on line 5 Warning: file_get_contents(http://fbclaurel.onthecity.org/plaza/events?format=json): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/8lJlW on line 5 Warning: Creating default object from empty value in /in/8lJlW on line 11 Warning: array_walk_recursive() expects parameter 1 to be array, null given in /in/8lJlW on line 15
Output for 7.4.3 - 7.4.25
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/8lJlW on line 5 Warning: file_get_contents(http://fbclaurel.onthecity.org/plaza/events?format=json): failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/8lJlW on line 5 Warning: Creating default object from empty value in /in/8lJlW on line 11 Warning: array_walk_recursive() expects parameter 1 to be array, null given in /in/8lJlW on line 15
Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.26, 7.3.0 - 7.3.13, 7.3.32 - 7.3.33
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/8lJlW on line 5 Warning: file_get_contents(http://fbclaurel.onthecity.org/plaza/events?format=json): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/8lJlW on line 5 Warning: array_walk_recursive() expects parameter 1 to be array, null given in /in/8lJlW on line 15
Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.31
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/8lJlW on line 5 Warning: file_get_contents(http://fbclaurel.onthecity.org/plaza/events?format=json): failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/8lJlW on line 5 Warning: array_walk_recursive() expects parameter 1 to be array, null given in /in/8lJlW on line 15
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION in /in/8lJlW on line 11
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_FUNCTION in /in/8lJlW on line 11
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/8lJlW on line 11
Process exited with code 255.

preferences:
330.56 ms | 401 KiB | 460 Q