3v4l.org

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

Function abc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0NpcX
function name:  abc
number of ops:  14
compiled vars:  !0 = $array, !1 = $what
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   25     2        INIT_FCALL                                               'array_search'
          3        SEND_VAR                                                 !1
          4        INIT_FCALL                                               'array_column'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 'what'
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                         $3      
         10        FETCH_DIM_R                                      ~4      !0, $3
         11        FETCH_DIM_R                                      ~5      ~4, 'map'
         12      > RETURN                                                   ~5
   26    13*     > RETURN                                                   null

End of function abc

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
126.76 ms | 1401 KiB | 18 Q