3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $isFan = file_get_contents("https://api.facebook.com/method/pages.isFan?format=json&access_token=" . USER_TOKEN . "&page_id=" . FB_FANPAGE_ID);
Output for 7.2.6
Warning: Use of undefined constant USER_TOKEN - assumed 'USER_TOKEN' (this will throw an Error in a future version of PHP) in /in/j6t05 on line 3 Warning: Use of undefined constant FB_FANPAGE_ID - assumed 'FB_FANPAGE_ID' (this will throw an Error in a future version of PHP) in /in/j6t05 on line 3 Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/j6t05 on line 3 Warning: file_get_contents(): open_basedir restriction in effect. File(https://api.facebook.com/method/pages.isFan?format=json&access_token=USER_TOKEN&page_id=FB_FANPAGE_ID) is not within the allowed path(s): (/tmp:/in) in /in/j6t05 on line 3 Warning: file_get_contents(https://api.facebook.com/method/pages.isFan?format=json&access_token=USER_TOKEN&page_id=FB_FANPAGE_ID): failed to open stream: Operation not permitted in /in/j6t05 on line 3
Output for 7.1.20
Notice: Use of undefined constant USER_TOKEN - assumed 'USER_TOKEN' in /in/j6t05 on line 3 Notice: Use of undefined constant FB_FANPAGE_ID - assumed 'FB_FANPAGE_ID' in /in/j6t05 on line 3 Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/j6t05 on line 3 Warning: file_get_contents(): open_basedir restriction in effect. File(https://api.facebook.com/method/pages.isFan?format=json&access_token=USER_TOKEN&page_id=FB_FANPAGE_ID) is not within the allowed path(s): (/tmp:/in) in /in/j6t05 on line 3 Warning: file_get_contents(https://api.facebook.com/method/pages.isFan?format=json&access_token=USER_TOKEN&page_id=FB_FANPAGE_ID): failed to open stream: Operation not permitted in /in/j6t05 on line 3
Output for 7.0.20, 7.1.5 - 7.1.10
Notice: Use of undefined constant USER_TOKEN - assumed 'USER_TOKEN' in /in/j6t05 on line 3 Notice: Use of undefined constant FB_FANPAGE_ID - assumed 'FB_FANPAGE_ID' in /in/j6t05 on line 3 Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/j6t05 on line 3 Warning: file_get_contents(https://api.facebook.com/method/pages.isFan?format=json&access_token=USER_TOKEN&page_id=FB_FANPAGE_ID): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/j6t05 on line 3
Output for 5.5.0 - 7.0.6, 7.1.0
Notice: Use of undefined constant USER_TOKEN - assumed 'USER_TOKEN' in /in/j6t05 on line 3 Notice: Use of undefined constant FB_FANPAGE_ID - assumed 'FB_FANPAGE_ID' in /in/j6t05 on line 3 Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/j6t05 on line 3 Warning: file_get_contents(https://api.facebook.com/method/pages.isFan?format=json&access_token=USER_TOKEN&page_id=FB_FANPAGE_ID): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/j6t05 on line 3