3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <?php $url = "http://apt.saurik.com/debs/"; //ファイル取得 $file = file_get_contents($url); $namepat = '/<a.*?<\/a>".*?"/'; preg_match_all($namepat, $file, $data, PREG_SET_ORDER); //日付を先に取得 $date = time(); $dates = date("Y/m/d H:i:s",$date); //echo date("Y/m/d H:i:s",$date); foreach ($data as $name) { echo $name[0]."<br />"; } if (!$data) { return false; }
based on fek2p
Output for 7.0.20, 7.1.5 - 7.2.0
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/LNtUZ on line 6 Warning: file_get_contents(http://apt.saurik.com/debs/): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/LNtUZ on line 6
Output for 5.4.0 - 7.0.10, 7.1.0
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/LNtUZ on line 6 Warning: file_get_contents(http://apt.saurik.com/debs/): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/LNtUZ on line 6