3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php print_r(search_next("http://graph.facebook.com/v2.4/215365285142591/posts?limit=100&format=json&access_token=CAAU1wFJC3B4BAMRwMmO9WeQ05kQuIbRoEQchQZAJhFCT21iolu2AgdkP7ftIwSzWolPAOazAOtGDzbdwjxHtnJGKWZChZBOMolYZAZB4aPnAZBVNe0TZBRLrC5ZCo6mUdD0GXjEhsvFMbVedQRpLKfTzBQU1dKMZCTYrnT6tEgyDgJf1wZBGtWp3wZAH0XoZACQDOtPZCm5G48uBTEPNbMv9MZAkfi&until=1434258144&__paging_token=enc_AdCSxfhZCLaWzKLZAMjBldWY56gg3OZAfZCyplLBOU1Rl6XOHcveIU5rZCQsSbewLe3FQ27sztix4xBmlpBAFdxaVvZAMAjN27uxO6tXHd7ZAbQNcHDZAQZDZD")); function search_next($url) { $lPost = json_decode(file_get_contents($url),true); $listacompelta = array(); array_push($listacompelta, $lPost["data"]); if(count($lPost["paging"])) { if(count($lPost["paging"]["next"])) { return array_merge($listacompelta,$this->search_next($lPost["paging"]["next"])); } } return $listacompelta; }
based on hDdaW
Output for 7.2.0
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/dMLAd on line 7 Warning: file_get_contents(http://graph.facebook.com/v2.4/215365285142591/posts?limit=100&format=json&access_token=CAAU1wFJC3B4BAMRwMmO9WeQ05kQuIbRoEQchQZAJhFCT21iolu2AgdkP7ftIwSzWolPAOazAOtGDzbdwjxHtnJGKWZChZBOMolYZAZB4aPnAZBVNe0TZBRLrC5ZCo6mUdD0GXjEhsvFMbVedQRpLKfTzBQU1dKMZCTYrnT6tEgyDgJf1wZBGtWp3wZAH0XoZACQDOtPZCm5G48uBTEPNbMv9MZAkfi&until=1434258144&__paging_token=enc_AdCSxfhZCLaWzKLZAMjBldWY56gg3OZAfZCyplLBOU1Rl6XOHcveIU5rZCQsSbewLe3FQ27sztix4xBmlpBAFdxaVvZAMAjN27uxO6tXHd7ZAbQNcHDZAQZDZD): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/dMLAd on line 7 Warning: count(): Parameter must be an array or an object that implements Countable in /in/dMLAd on line 13 Array ( [0] => )
Output for 5.3.19 - 5.4.45, 5.5.33, 5.6.18 - 5.6.19, 7.0.4, 7.0.20, 7.1.5 - 7.1.10
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/dMLAd on line 7 Warning: file_get_contents(http://graph.facebook.com/v2.4/215365285142591/posts?limit=100&format=json&access_token=CAAU1wFJC3B4BAMRwMmO9WeQ05kQuIbRoEQchQZAJhFCT21iolu2AgdkP7ftIwSzWolPAOazAOtGDzbdwjxHtnJGKWZChZBOMolYZAZB4aPnAZBVNe0TZBRLrC5ZCo6mUdD0GXjEhsvFMbVedQRpLKfTzBQU1dKMZCTYrnT6tEgyDgJf1wZBGtWp3wZAH0XoZACQDOtPZCm5G48uBTEPNbMv9MZAkfi&until=1434258144&__paging_token=enc_AdCSxfhZCLaWzKLZAMjBldWY56gg3OZAfZCyplLBOU1Rl6XOHcveIU5rZCQsSbewLe3FQ27sztix4xBmlpBAFdxaVvZAMAjN27uxO6tXHd7ZAbQNcHDZAQZDZD): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/dMLAd on line 7 Array ( [0] => )
Output for 5.5.24 - 5.5.32, 5.5.34 - 5.6.17, 5.6.20 - 7.0.3, 7.0.5 - 7.0.6, 7.1.0
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/dMLAd on line 7 Warning: file_get_contents(http://graph.facebook.com/v2.4/215365285142591/posts?limit=100&format=json&access_token=CAAU1wFJC3B4BAMRwMmO9WeQ05kQuIbRoEQchQZAJhFCT21iolu2AgdkP7ftIwSzWolPAOazAOtGDzbdwjxHtnJGKWZChZBOMolYZAZB4aPnAZBVNe0TZBRLrC5ZCo6mUdD0GXjEhsvFMbVedQRpLKfTzBQU1dKMZCTYrnT6tEgyDgJf1wZBGtWp3wZAH0XoZACQDOtPZCm5G48uBTEPNbMv9MZAkfi&until=1434258144&__paging_token=enc_AdCSxfhZCLaWzKLZAMjBldWY56gg3OZAfZCyplLBOU1Rl6XOHcveIU5rZCQsSbewLe3FQ27sztix4xBmlpBAFdxaVvZAMAjN27uxO6tXHd7ZAbQNcHDZAQZDZD): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/dMLAd on line 7 Array ( [0] => )