3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_time_limit(20); $query_data = array('track' => 'lo que quieres buscar'); $user = 'username'; // replace with your account $pass = 'password'; // replace with your account $fp = fsockopen("stream.twitter.com", 80, $errno, $errstr, 20); if(!$fp){ print "$errstr ($errno)\n"; } else { $request = "GET /1/statuses/filter.json?" . http_build_query($query_data) . " HTTP/1.1\r\n"; $request .= "Host: stream.twitter.com\r\n"; $request .= "Authorization: Basic " . base64_encode($user . ':' . $pass) . "\r\n\r\n"; //fwrite($fp, $request); while(!feof($fp)){ $json = fgets($fp); echo($json); $data = json_decode($json, true); if($data){ // // Do something with the data! // var_dump($data); } } fclose($fp); }
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
Warning: fsockopen(): php_network_getaddresses: getaddrinfo for stream.twitter.com failed: System error in /in/aMGGh on line 9 Warning: fsockopen(): Unable to connect to stream.twitter.com:80 (php_network_getaddresses: getaddrinfo for stream.twitter.com failed: System error) in /in/aMGGh on line 9 php_network_getaddresses: getaddrinfo for stream.twitter.com failed: System error (0)
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Warning: fsockopen(): php_network_getaddresses: getaddrinfo for stream.twitter.com failed: System error in /in/aMGGh on line 9 Warning: fsockopen(): Unable to connect to stream.twitter.com:80 (php_network_getaddresses: getaddrinfo for stream.twitter.com failed: System error) in /in/aMGGh on line 9 php_network_getaddresses: getaddrinfo for stream.twitter.com failed: System error (0)
Output for 8.0.13 - 8.0.30
Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: System error in /in/aMGGh on line 9 Warning: fsockopen(): Unable to connect to stream.twitter.com:80 (php_network_getaddresses: getaddrinfo failed: System error) in /in/aMGGh on line 9 php_network_getaddresses: getaddrinfo failed: System error (0)
Output for 8.0.0 - 8.0.12
Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/aMGGh on line 9 Warning: fsockopen(): Unable to connect to stream.twitter.com:80 (php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution) in /in/aMGGh on line 9 php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution (0)
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.6, 7.3.32 - 7.3.33, 7.4.0, 7.4.26 - 7.4.33
Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: System error in /in/aMGGh on line 9 Warning: fsockopen(): unable to connect to stream.twitter.com:80 (php_network_getaddresses: getaddrinfo failed: System error) in /in/aMGGh on line 9 php_network_getaddresses: getaddrinfo failed: System error (0)
Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.31, 7.4.3 - 7.4.25
Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/aMGGh on line 9 Warning: fsockopen(): unable to connect to stream.twitter.com:80 (php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution) in /in/aMGGh on line 9 php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution (0)

preferences:
150.17 ms | 402 KiB | 173 Q