3v4l.org

run code in 300+ PHP versions simultaneously
<?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 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
Fatal error: Uncaught Error: Undefined constant "USER_TOKEN" in /in/j6t05:3 Stack trace: #0 {main} thrown in /in/j6t05 on line 3
Process exited with code 255.
Output for 7.3.32 - 7.3.33, 7.4.33
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(https://api.facebook.com/method/pages.isFan?format=json&access_token=USER_TOKEN&page_id=FB_FANPAGE_ID): failed to open stream: No such file or directory in /in/j6t05 on line 3
Output for 7.2.17 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.32
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:/etc) 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.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.26 - 7.1.33
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:/etc) 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 - 5.5.35, 5.6.0 - 5.6.28, 7.0.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

preferences:
194.93 ms | 403 KiB | 245 Q