3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array( array ( 'fallback_host' => 'tc.v17.cache6.googlevideo.com', 'itag' => '22', 'type' => 'video/mp4', codecs="avc1.64001F, mp4a.40.2" 'url' => 'http://r2---sn-5hn7ym76.googlevideo.com/videoplayback?expire=1412297179&upn=H_W9V7NSkyw&ipbits=0&nh=EAE&key=yt5&itag=22&mm=31&source=youtube&mv=u&ip=31.220.17.48&mt=1412275560&ms=au&fexp=911305%2C915516%2C927622%2C930666%2C930826%2C931983%2C932404%2C934030%2C935672%2C946013%2C947209%2C952302%2C953801&sparams=dur%2Cid%2Cip%2Cipbits%2Citag%2Cmime%2Cmm%2Cms%2Cmv%2Cnh%2Csource%2Cupn%2Cexpire&sver=3&signature=27EE3599D3E524ABFFF59F9239C4C0ED6AF46946.02A3EB7A4C3D4191A42F332AE17ED0399EB2DFC4&dur=600.653&mime=video%2Fmp4&id=o-AKruX81c6iPJIurBOhYrCZpUE1fo6nDgDdQljlWHAD8j', 'quality' => 'hd720' ) ); $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 TjoCh
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.4.32
Parse error: syntax error, unexpected '=', expecting ')' in /in/3sHPc on line 4
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/3sHPc on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/3sHPc on line 4
Process exited with code 255.