3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ [ "what" => "b4", "map" => "74,76,77,83" ], [ "what" => "b2", "map" => "53,82" ], [ "what" => "b1", "map" => "36" ] ]; function abc($what, $arrays){ foreach ($arrays as $array) { if ($array['what'] === $what) { return $array['map']; } } } echo (abc('b4', $a));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FBFQ9
function name:  (null)
number of ops:  7
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   25     1        INIT_FCALL                                               'abc'
          2        SEND_VAL                                                 'b4'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $2      
          5        ECHO                                                     $2
          6      > RETURN                                                   1

Function abc:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 11
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/FBFQ9
function name:  abc
number of ops:  13
compiled vars:  !0 = $what, !1 = $arrays, !2 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   18     2      > FE_RESET_R                                       $3      !1, ->11
          3    > > FE_FETCH_R                                               $3, !2, ->11
   19     4    >   FETCH_DIM_R                                      ~4      !2, 'what'
          5        IS_IDENTICAL                                             !0, ~4
          6      > JMPZ                                                     ~5, ->10
   20     7    >   FETCH_DIM_R                                      ~6      !2, 'map'
          8        FE_FREE                                                  $3
          9      > RETURN                                                   ~6
   18    10    > > JMP                                                      ->3
         11    >   FE_FREE                                                  $3
   23    12      > RETURN                                                   null

End of function abc

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
271.37 ms | 1011 KiB | 14 Q