3v4l.org

run code in 300+ PHP versions simultaneously
<?php $variable1 = fopen("https://en.wikipedia.org/w/api.php?action=query&prop=pageimages&format=json&piprop=original&titles=Tomoyasu_Hotei", "r"); $variable2 = stream_get_contents($variable1); fclose($variable1); $variable3 = json_decode($variable2, true); $variable4 = $variable3["query"]["pages"]; echo "<pre>"; var_dump($variable4); echo "</pre>";
Output for 8.3.0 - 8.3.4
Warning: fopen(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/eJXXI on line 3 Warning: fopen(): open_basedir restriction in effect. File(https://en.wikipedia.org/w/api.php?action=query&prop=pageimages&format=json&piprop=original&titles=Tomoyasu_Hotei) is not within the allowed path(s): (/tmp:/in:/etc) in /in/eJXXI on line 3 Warning: fopen(https://en.wikipedia.org/w/api.php?action=query&prop=pageimages&format=json&piprop=original&titles=Tomoyasu_Hotei): Failed to open stream: Operation not permitted in /in/eJXXI on line 3 Fatal error: Uncaught TypeError: stream_get_contents(): Argument #1 ($stream) must be of type resource, false given in /in/eJXXI:4 Stack trace: #0 /in/eJXXI(4): stream_get_contents(false) #1 {main} thrown in /in/eJXXI on line 4
Process exited with code 255.
Output for 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17
Warning: fopen(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/eJXXI on line 3 Warning: fopen(): open_basedir restriction in effect. File(https://en.wikipedia.org/w/api.php?action=query&prop=pageimages&format=json&piprop=original&titles=Tomoyasu_Hotei) is not within the allowed path(s): (/tmp:/in:/etc) in /in/eJXXI on line 3 Warning: fopen(https://en.wikipedia.org/w/api.php?action=query&prop=pageimages&format=json&piprop=original&titles=Tomoyasu_Hotei): Failed to open stream: Operation not permitted in /in/eJXXI on line 3 Fatal error: Uncaught TypeError: stream_get_contents(): Argument #1 ($stream) must be of type resource, bool given in /in/eJXXI:4 Stack trace: #0 /in/eJXXI(4): stream_get_contents(false) #1 {main} thrown in /in/eJXXI on line 4
Process exited with code 255.
Output for 8.0.13
Warning: fopen(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/eJXXI on line 3 Warning: fopen(https://en.wikipedia.org/w/api.php?action=query&prop=pageimages&format=json&piprop=original&titles=Tomoyasu_Hotei): Failed to open stream: No such file or directory in /in/eJXXI on line 3 Fatal error: Uncaught TypeError: stream_get_contents(): Argument #1 ($stream) must be of type resource, bool given in /in/eJXXI:4 Stack trace: #0 /in/eJXXI(4): stream_get_contents(false) #1 {main} thrown in /in/eJXXI on line 4
Process exited with code 255.
Output for 7.4.33
Warning: fopen(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/eJXXI on line 3 Warning: fopen(https://en.wikipedia.org/w/api.php?action=query&prop=pageimages&format=json&piprop=original&titles=Tomoyasu_Hotei): failed to open stream: No such file or directory in /in/eJXXI on line 3 Warning: stream_get_contents() expects parameter 1 to be resource, bool given in /in/eJXXI on line 4 Warning: fclose() expects parameter 1 to be resource, bool given in /in/eJXXI on line 5 Notice: Trying to access array offset on value of type null in /in/eJXXI on line 7 Notice: Trying to access array offset on value of type null in /in/eJXXI on line 7 <pre>NULL </pre>
Output for 7.4.0 - 7.4.32
Warning: fopen(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/eJXXI on line 3 Warning: fopen(): open_basedir restriction in effect. File(https://en.wikipedia.org/w/api.php?action=query&prop=pageimages&format=json&piprop=original&titles=Tomoyasu_Hotei) is not within the allowed path(s): (/tmp:/in:/etc) in /in/eJXXI on line 3 Warning: fopen(https://en.wikipedia.org/w/api.php?action=query&prop=pageimages&format=json&piprop=original&titles=Tomoyasu_Hotei): failed to open stream: Operation not permitted in /in/eJXXI on line 3 Warning: stream_get_contents() expects parameter 1 to be resource, bool given in /in/eJXXI on line 4 Warning: fclose() expects parameter 1 to be resource, bool given in /in/eJXXI on line 5 Notice: Trying to access array offset on value of type null in /in/eJXXI on line 7 Notice: Trying to access array offset on value of type null in /in/eJXXI on line 7 <pre>NULL </pre>
Output for 7.3.32 - 7.3.33
Warning: fopen(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/eJXXI on line 3 Warning: fopen(https://en.wikipedia.org/w/api.php?action=query&prop=pageimages&format=json&piprop=original&titles=Tomoyasu_Hotei): failed to open stream: No such file or directory in /in/eJXXI on line 3 Warning: stream_get_contents() expects parameter 1 to be resource, bool given in /in/eJXXI on line 4 Warning: fclose() expects parameter 1 to be resource, bool given in /in/eJXXI on line 5 <pre>NULL </pre>
Output for 7.3.0 - 7.3.31
Warning: fopen(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/eJXXI on line 3 Warning: fopen(): open_basedir restriction in effect. File(https://en.wikipedia.org/w/api.php?action=query&prop=pageimages&format=json&piprop=original&titles=Tomoyasu_Hotei) is not within the allowed path(s): (/tmp:/in:/etc) in /in/eJXXI on line 3 Warning: fopen(https://en.wikipedia.org/w/api.php?action=query&prop=pageimages&format=json&piprop=original&titles=Tomoyasu_Hotei): failed to open stream: Operation not permitted in /in/eJXXI on line 3 Warning: stream_get_contents() expects parameter 1 to be resource, bool given in /in/eJXXI on line 4 Warning: fclose() expects parameter 1 to be resource, bool given in /in/eJXXI on line 5 <pre>NULL </pre>
Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33
Warning: fopen(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/eJXXI on line 3 Warning: fopen(): open_basedir restriction in effect. File(https://en.wikipedia.org/w/api.php?action=query&prop=pageimages&format=json&piprop=original&titles=Tomoyasu_Hotei) is not within the allowed path(s): (/tmp:/in:/etc) in /in/eJXXI on line 3 Warning: fopen(https://en.wikipedia.org/w/api.php?action=query&prop=pageimages&format=json&piprop=original&titles=Tomoyasu_Hotei): failed to open stream: Operation not permitted in /in/eJXXI on line 3 Warning: stream_get_contents() expects parameter 1 to be resource, boolean given in /in/eJXXI on line 4 Warning: fclose() expects parameter 1 to be resource, boolean given in /in/eJXXI on line 5 <pre>NULL </pre>

preferences:
219.91 ms | 403 KiB | 283 Q