3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = Array ( [0] => url=http%3A%2F%2Fr2---sn-5hn7ym76.googlevideo.com%2Fvideoplayback%3Fipbits%3D0%26mm%3D31%26sparams%3Did%252Cip%252Cipbits%252Citag%252Cmime%252Cmm%252Cms%252Cmv%252Cnh%252Cratebypass%252Csource%252Cupn%252Cexpire%26id%3Do-AD6lKzgRxO1hPMTfnTtQBgAbhULnsMeoUeGjg6JbtjTM%26sver%3D3%26ratebypass%3Dyes%26expire%3D1412367850%26itag%3D22%26ip%3D31.220.17.48%26mt%3D1412346218%26signature%3DEE536C4DF6FB9B2FDC845499F45B59598396A0DF.E94DCB96328840C6D670FE0EF9EEBF3242A4CEB4%26fexp%3D900147%252C927622%252C930666%252C931983%252C932404%252C934030%252C946023%252C947209%252C952302%252C953801%26upn%3D2ClXU7weCtk%26source%3Dyoutube%26nh%3DEAE%26mv%3Du%26key%3Dyt5%26mime%3Dvideo%252Fmp4%26ms%3Dau&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%3Fipbits%3D0%26mm%3D31%26sparams%3Did%252Cip%252Cipbits%252Citag%252Cmime%252Cmm%252Cms%252Cmv%252Cnh%252Cratebypass%252Csource%252Cupn%252Cexpire%26id%3Do-AD6lKzgRxO1hPMTfnTtQBgAbhULnsMeoUeGjg6JbtjTM%26sver%3D3%26ratebypass%3Dyes%26expire%3D1412367850%26itag%3D43%26ip%3D31.220.17.48%26mt%3D1412346218%26signature%3D88335922818A5D81D1ECC9899D1EFC6A6A80087C.AD23770B5ACD8EF0B3B4CA5FDC28672E637052DE%26fexp%3D900147%252C927622%252C930666%252C931983%252C932404%252C934030%252C946023%252C947209%252C952302%252C953801%26upn%3D2ClXU7weCtk%26source%3Dyoutube%26nh%3DEAE%26mv%3Du%26key%3Dyt5%26mime%3Dvideo%252Fwebm%26ms%3Dau&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%3Fipbits%3D0%26mm%3D31%26sparams%3Did%252Cip%252Cipbits%252Citag%252Cmime%252Cmm%252Cms%252Cmv%252Cnh%252Cratebypass%252Csource%252Cupn%252Cexpire%26id%3Do-AD6lKzgRxO1hPMTfnTtQBgAbhULnsMeoUeGjg6JbtjTM%26sver%3D3%26ratebypass%3Dyes%26expire%3D1412367850%26itag%3D18%26ip%3D31.220.17.48%26mt%3D1412346218%26signature%3D38A7BE6EBA4C05553212A771518C70BB883D2EAF.DE9554AA0787659DBAD8E1372047B7D996A5BDDE%26fexp%3D900147%252C927622%252C930666%252C931983%252C932404%252C934030%252C946023%252C947209%252C952302%252C953801%26upn%3D2ClXU7weCtk%26source%3Dyoutube%26nh%3DEAE%26mv%3Du%26key%3Dyt5%26mime%3Dvideo%252Fmp4%26ms%3Dau&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%3Fipbits%3D0%26mm%3D31%26sparams%3Did%252Cip%252Cipbits%252Citag%252Cmime%252Cmm%252Cms%252Cmv%252Cnh%252Csource%252Cupn%252Cexpire%26id%3Do-AD6lKzgRxO1hPMTfnTtQBgAbhULnsMeoUeGjg6JbtjTM%26sver%3D3%26expire%3D1412367850%26itag%3D5%26ip%3D31.220.17.48%26mt%3D1412346218%26signature%3D7A8DFB30D13B26B9382417F4AFF02A2AC8621DA3.F7D95B4D32FF879C934B4ECF1F4A566430F1B268%26fexp%3D900147%252C927622%252C930666%252C931983%252C932404%252C934030%252C946023%252C947209%252C952302%252C953801%26upn%3D2ClXU7weCtk%26source%3Dyoutube%26nh%3DEAE%26mv%3Du%26key%3Dyt5%26mime%3Dvideo%252Fx-flv%26ms%3Dau&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%3Fipbits%3D0%26mm%3D31%26sparams%3Did%252Cip%252Cipbits%252Citag%252Cmime%252Cmm%252Cms%252Cmv%252Cnh%252Csource%252Cupn%252Cexpire%26id%3Do-AD6lKzgRxO1hPMTfnTtQBgAbhULnsMeoUeGjg6JbtjTM%26sver%3D3%26expire%3D1412367850%26itag%3D36%26ip%3D31.220.17.48%26mt%3D1412346218%26signature%3D376A93C38E2C3EEC143691758F9F5B07D8D56BD2.290067E3FA6D93465E2B19305AED7F7A701C5773%26fexp%3D900147%252C927622%252C930666%252C931983%252C932404%252C934030%252C946023%252C947209%252C952302%252C953801%26upn%3D2ClXU7weCtk%26source%3Dyoutube%26nh%3DEAE%26mv%3Du%26key%3Dyt5%26mime%3Dvideo%252F3gpp%26ms%3Dau&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%3Fipbits%3D0%26mm%3D31%26sparams%3Did%252Cip%252Cipbits%252Citag%252Cmime%252Cmm%252Cms%252Cmv%252Cnh%252Csource%252Cupn%252Cexpire%26id%3Do-AD6lKzgRxO1hPMTfnTtQBgAbhULnsMeoUeGjg6JbtjTM%26sver%3D3%26expire%3D1412367850%26itag%3D17%26ip%3D31.220.17.48%26mt%3D1412346218%26signature%3DEB8B46E3EDB38E2E6313393E07EE88AD77007138.EBDB477E12AA0BF08A77083FDFBEA172CD4A4E5A%26fexp%3D900147%252C927622%252C930666%252C931983%252C932404%252C934030%252C946023%252C947209%252C952302%252C953801%26upn%3D2ClXU7weCtk%26source%3Dyoutube%26nh%3DEAE%26mv%3Du%26key%3Dyt5%26mime%3Dvideo%252F3gpp%26ms%3Dau&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 ) print_r ($array); $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); test($array, 36);
based on RAR0m
Output for 5.4.0 - 5.4.32
Parse error: syntax error, unexpected '=', expecting ')' in /in/h7Mcj 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/h7Mcj 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/h7Mcj on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/h7Mcj on line 3
Process exited with code 255.