3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( array ( 'fallback_host' => 'tc.v17.cache6.googlevideo.com', 'itag' => '22', 'type' => 'video/mp4', '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, 22); test($array, 18);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0JKOT
function name:  (null)
number of ops:  11
compiled vars:  !0 = $array, !1 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    7     1        ASSIGN                                                   !1, <array>
   16     2        INIT_FCALL                                               'test'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 22
          5        DO_FCALL                                      0          
   17     6        INIT_FCALL                                               'test'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 18
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 15
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 15
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 14
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 14
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/0JKOT
function name:  test
number of ops:  17
compiled vars:  !0 = $array, !1 = $number, !2 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   10     2      > FE_RESET_R                                       $3      !0, ->15
          3    > > FE_FETCH_R                                               $3, !2, ->15
   11     4    >   FETCH_DIM_R                                      ~4      !2, 'itag'
          5        IS_EQUAL                                                 !1, ~4
          6      > JMPZ                                                     ~5, ->14
   12     7    >   FETCH_DIM_R                                      ~6      !2, 'url'
          8        CONCAT                                           ~7      '%3Ca+href%3D%22', ~6
          9        CONCAT                                           ~8      ~7, '%22%3Equality%3A+'
         10        FETCH_DIM_R                                      ~9      !2, 'itag'
         11        CONCAT                                           ~10     ~8, ~9
         12        CONCAT                                           ~11     ~10, '%3C%2Fa%3E'
         13        ECHO                                                     ~11
   10    14    > > JMP                                                      ->3
         15    >   FE_FREE                                                  $3
   14    16      > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.17 ms | 1399 KiB | 15 Q