3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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 7.3.0rc3
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 7.3.0alpha1 - 7.3.0beta1
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.2.11
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>
Output for 7.1.20, 7.2.6
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) 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>
Output for 5.6.0 - 5.6.30, 7.1.0 - 7.1.16, 7.2.0 - 7.2.4
Warning: fopen(): php_network_getaddresses: getaddrinfo failed: System error 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: php_network_getaddresses: getaddrinfo failed: System error 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>
Output for hhvm-3.22.0
Warning: Failed to open https://en.wikipedia.org/w/api.php?action=query&prop=pageimages&format=json&piprop=original&titles=Tomoyasu_Hotei (Could not resolve host: en.wikipedia.org) in /in/eJXXI on line -1 Warning: stream_get_contents() expects parameter 1 to be resource, boolean given in /in/eJXXI on line -1 Warning: fclose() expects parameter 1 to be resource, boolean given in /in/eJXXI on line -1 <pre>NULL </pre>
Output for hhvm-3.18.5 - 3.21.3
Warning: Failed to open https://en.wikipedia.org/w/api.php?action=query&prop=pageimages&format=json&piprop=original&titles=Tomoyasu_Hotei (Could not resolve host: en.wikipedia.org) 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>