3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( array( 'url' => 'http://website.com1/etcetcetc', 'itag' => 43, 'quality' => 'medium', 'something' => 'nill' ), array( 'url' => 'http://website.com2/etcetcetc', 'itag' => 18, 'quality' => 'medium', 'something' => 'nill' ), array( 'url' => 'http://website.com3/etcetcetc', 'itag' => 5, 'quality' => 'small', 'something' => 'nill' ), array( 'url' => 'http://website.com4/etcetcetc', 'itag' => 36, 'quality' => 'small', 'something' => 'nill' ), array( 'url' => 'http://website.com5/etcetcetc', 'itag' => 17, 'quality' => 'small', 'something' => 'nill' ) ); 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);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/582TQ
function name:  (null)
number of ops:  18
compiled vars:  !0 = $array, !1 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        INIT_FCALL                                               'print_r'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   11     4        ASSIGN                                                   !1, <array>
   20     5        INIT_FCALL                                               'test'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 43
          8        DO_FCALL                                      0          
   21     9        INIT_FCALL                                               'test'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 18
         12        DO_FCALL                                      0          
   22    13        INIT_FCALL                                               'test'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 36
         16        DO_FCALL                                      0          
         17      > 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/582TQ
function name:  test
number of ops:  17
compiled vars:  !0 = $array, !1 = $number, !2 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   14     2      > FE_RESET_R                                       $3      !0, ->15
          3    > > FE_FETCH_R                                               $3, !2, ->15
   15     4    >   FETCH_DIM_R                                      ~4      !2, 'itag'
          5        IS_EQUAL                                                 !1, ~4
          6      > JMPZ                                                     ~5, ->14
   16     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
   14    14    > > JMP                                                      ->3
         15    >   FE_FREE                                                  $3
   18    16      > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.52 ms | 1394 KiB | 18 Q