3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getGoogleSuggestions($query){ $file = file_get_contents("https://www.google.com/search?q=".urlencode($query)); $ex0 = explode('Did you mean:', $file); $ex2 = explode("</i></b>", $ex0[1]); $ex3 = explode("class=p>",$ex2[0]); $ex4 = str_replace('<b><i>', '', $ex3[1]); return "Did you mean: ".$ex4; } $file = file_get_contents('http://www.goxal.com/words.txt'); $explodeit = explode(" ",$file); foreach($explodeit as $value) { $query = trim($value); echo $value. " - " .getGoogleSuggestions($query).'<br>'; }
Output for git.master, git.master_jit, rfc.property-hooks
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for www.goxal.com failed: System error in /in/GfaKt on line 13 Warning: file_get_contents(http://www.goxal.com/words.txt): Failed to open stream: php_network_getaddresses: getaddrinfo for www.goxal.com failed: System error in /in/GfaKt on line 13 Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/GfaKt on line 5 Warning: file_get_contents(): open_basedir restriction in effect. File(https://www.google.com/search?q=) is not within the allowed path(s): (/tmp:/in:/etc) in /in/GfaKt on line 5 Warning: file_get_contents(https://www.google.com/search?q=): Failed to open stream: Operation not permitted in /in/GfaKt on line 5 Warning: Undefined array key 1 in /in/GfaKt on line 7 Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /in/GfaKt on line 7 Warning: Undefined array key 1 in /in/GfaKt on line 9 Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /in/GfaKt on line 9 - Did you mean: <br>

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
51.3 ms | 403 KiB | 8 Q