3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array(Array ( [0] => url=http%3A%2F%2Fr2---sn-5hn7ym76.googlevideo.com%2Fvideoplayback%3Fmt%3D1412275472%26ip%3D31.220.17.48%26ipbits%3D0%26mm%3D31%26ms%3Dau%26mime%3Dvideo%252Fmp4%26signature%3D6A0D20706876ED2A288A3F894E822C166EF00E2B.02E280AE36C2A7D997BE02C61CDB24ED0348E4B6%26source%3Dyoutube%26ratebypass%3Dyes%26mv%3Du%26itag%3D22%26nh%3DEAE%26sver%3D3%26upn%3DCokPLzbANcE%26expire%3D1412297094%26sparams%3Did%252Cip%252Cipbits%252Citag%252Cmime%252Cmm%252Cms%252Cmv%252Cnh%252Cratebypass%252Csource%252Cupn%252Cexpire%26id%3Do-ANlo8JeubZwck7GH6nRPMN_mi0ooR7e4iPyvs0nh-avz%26fexp%3D914064%252C927622%252C930666%252C931983%252C932404%252C934030%252C935667%252C943409%252C946013%252C947209%252C949007%252C950618%252C952302%252C953801%26key%3Dyt5&fallback_host=tc.v17.cache6.googlevideo.com&type=video%2Fmp4%3B+codecs%3D%22avc1.64001F%2C+mp4a.40.2%22&itag=22&quality=hd720 [1] => url=http%3A%2F%2Fr2---sn-5hn7ym76.googlevideo.com%2Fvideoplayback%3Fmt%3D1412275472%26ip%3D31.220.17.48%26ipbits%3D0%26mm%3D31%26ms%3Dau%26mime%3Dvideo%252Fwebm%26signature%3D06F42D826B164471EC85B4318B89330127AC78FB.1F1D51DB1EE19FE53759D6312A161A442A421A07%26source%3Dyoutube%26ratebypass%3Dyes%26mv%3Du%26itag%3D43%26nh%3DEAE%26sver%3D3%26upn%3DCokPLzbANcE%26expire%3D1412297094%26sparams%3Did%252Cip%252Cipbits%252Citag%252Cmime%252Cmm%252Cms%252Cmv%252Cnh%252Cratebypass%252Csource%252Cupn%252Cexpire%26id%3Do-ANlo8JeubZwck7GH6nRPMN_mi0ooR7e4iPyvs0nh-avz%26fexp%3D914064%252C927622%252C930666%252C931983%252C932404%252C934030%252C935667%252C943409%252C946013%252C947209%252C949007%252C950618%252C952302%252C953801%26key%3Dyt5&fallback_host=tc.v23.cache2.googlevideo.com&type=video%2Fwebm%3B+codecs%3D%22vp8.0%2C+vorbis%22&itag=43&quality=medium [2] => url=http%3A%2F%2Fr2---sn-5hn7ym76.googlevideo.com%2Fvideoplayback%3Fmt%3D1412275472%26ip%3D31.220.17.48%26ipbits%3D0%26mm%3D31%26ms%3Dau%26mime%3Dvideo%252Fmp4%26signature%3D9EDB5E1DEBFEC787BE953EBCAE89B6EF53188787.1A96934D1EA7BB3B217F9627D4575839E0B8B0BE%26source%3Dyoutube%26ratebypass%3Dyes%26mv%3Du%26itag%3D18%26nh%3DEAE%26sver%3D3%26upn%3DCokPLzbANcE%26expire%3D1412297094%26sparams%3Did%252Cip%252Cipbits%252Citag%252Cmime%252Cmm%252Cms%252Cmv%252Cnh%252Cratebypass%252Csource%252Cupn%252Cexpire%26id%3Do-ANlo8JeubZwck7GH6nRPMN_mi0ooR7e4iPyvs0nh-avz%26fexp%3D914064%252C927622%252C930666%252C931983%252C932404%252C934030%252C935667%252C943409%252C946013%252C947209%252C949007%252C950618%252C952302%252C953801%26key%3Dyt5&fallback_host=tc.v21.cache4.googlevideo.com&type=video%2Fmp4%3B+codecs%3D%22avc1.42001E%2C+mp4a.40.2%22&itag=18&quality=medium [3] => url=http%3A%2F%2Fr2---sn-5hn7ym76.googlevideo.com%2Fvideoplayback%3Fmt%3D1412275472%26ipbits%3D0%26mm%3D31%26ms%3Dau%26mime%3Dvideo%252Fx-flv%26signature%3DBE1C872377C1EC9AD09039E03AA3DD9296BDDC98.11FC361A51F56ABC840F1A11E344087B186CBCB9%26source%3Dyoutube%26ip%3D31.220.17.48%26mv%3Du%26itag%3D5%26nh%3DEAE%26sver%3D3%26upn%3DCokPLzbANcE%26expire%3D1412297094%26sparams%3Did%252Cip%252Cipbits%252Citag%252Cmime%252Cmm%252Cms%252Cmv%252Cnh%252Csource%252Cupn%252Cexpire%26id%3Do-ANlo8JeubZwck7GH6nRPMN_mi0ooR7e4iPyvs0nh-avz%26fexp%3D914064%252C927622%252C930666%252C931983%252C932404%252C934030%252C935667%252C943409%252C946013%252C947209%252C949007%252C950618%252C952302%252C953801%26key%3Dyt5&fallback_host=tc.v21.cache5.googlevideo.com&type=video%2Fx-flv&itag=5&quality=small [4] => url=http%3A%2F%2Fr2---sn-5hn7ym76.googlevideo.com%2Fvideoplayback%3Fmt%3D1412275472%26ipbits%3D0%26mm%3D31%26ms%3Dau%26mime%3Dvideo%252F3gpp%26signature%3D483E4256261E892174E8E44ED078D161201033B8.C68BF643B0A212B39C700FD1E1BE3AC72B621C14%26source%3Dyoutube%26ip%3D31.220.17.48%26mv%3Du%26itag%3D36%26nh%3DEAE%26sver%3D3%26upn%3DCokPLzbANcE%26expire%3D1412297094%26sparams%3Did%252Cip%252Cipbits%252Citag%252Cmime%252Cmm%252Cms%252Cmv%252Cnh%252Csource%252Cupn%252Cexpire%26id%3Do-ANlo8JeubZwck7GH6nRPMN_mi0ooR7e4iPyvs0nh-avz%26fexp%3D914064%252C927622%252C930666%252C931983%252C932404%252C934030%252C935667%252C943409%252C946013%252C947209%252C949007%252C950618%252C952302%252C953801%26key%3Dyt5&fallback_host=tc.v15.cache4.googlevideo.com&type=video%2F3gpp%3B+codecs%3D%22mp4v.20.3%2C+mp4a.40.2%22&itag=36&quality=small [5] => url=http%3A%2F%2Fr2---sn-5hn7ym76.googlevideo.com%2Fvideoplayback%3Fmt%3D1412275472%26ipbits%3D0%26mm%3D31%26ms%3Dau%26mime%3Dvideo%252F3gpp%26signature%3D596C5195AA24F86354EFFEDA485A348542056812.A13D8402DD2416A430ED974564F35D54B1972483%26source%3Dyoutube%26ip%3D31.220.17.48%26mv%3Du%26itag%3D17%26nh%3DEAE%26sver%3D3%26upn%3DCokPLzbANcE%26expire%3D1412297094%26sparams%3Did%252Cip%252Cipbits%252Citag%252Cmime%252Cmm%252Cms%252Cmv%252Cnh%252Csource%252Cupn%252Cexpire%26id%3Do-ANlo8JeubZwck7GH6nRPMN_mi0ooR7e4iPyvs0nh-avz%26fexp%3D914064%252C927622%252C930666%252C931983%252C932404%252C934030%252C935667%252C943409%252C946013%252C947209%252C949007%252C950618%252C952302%252C953801%26key%3Dyt5&fallback_host=tc.v18.cache8.googlevideo.com&type=video%2F3gpp%3B+codecs%3D%22mp4v.20.3%2C+mp4a.40.2%22&itag=17&quality=small ) ); $r = array(); function test($array, $number) { foreach($array as $r) if ($r['itag'] == $number) { echo '<a href="'.$r['url'].'">quality: '.$r['itag'].'</a>'; } } test($array, 43); test($array, 18);
based on sFUQt
Output for hhvm-3.10.0
Fatal error: syntax error, unexpected '=', expecting ')' in /in/ZDRoj on line 3
Process exited with code 255.
Output for 5.4.0 - 5.6.15
Parse error: syntax error, unexpected '=', expecting ')' in /in/ZDRoj on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/ZDRoj on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[', expecting ')' in /in/ZDRoj on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/ZDRoj on line 3
Process exited with code 255.