3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str=file_get_contents('http://cn.bing.com/HPImageArchive.aspx?idx=0&n=1'); if(preg_match("/<url>(.+?)<\/url>/ies",$str,$matches)){ $imgurl='http://cn.bing.com'.$matches[1]; } if($imgurl){ header('Content-Type: image/JPEG'); @ob_end_clean(); @readfile($imgurl); @flush(); @ob_flush(); exit(); }else{ exit('error'); }
Output for git.master, git.master_jit, rfc.property-hooks
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for cn.bing.com failed: System error in /in/q703J on line 2 Warning: file_get_contents(http://cn.bing.com/HPImageArchive.aspx?idx=0&n=1): Failed to open stream: php_network_getaddresses: getaddrinfo for cn.bing.com failed: System error in /in/q703J on line 2 Warning: preg_match(): The /e modifier is no longer supported, use preg_replace_callback instead in /in/q703J on line 3 Warning: Undefined variable $imgurl in /in/q703J on line 6 error

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:
49.93 ms | 402 KiB | 8 Q