3v4l.org

run code in 300+ PHP versions simultaneously
<?php function _map($type,$val){ //translations $map = array('comparison_operator'=> array('OP_EQ'=>'=', 'OP_NEQ'=>'!=', 'OP_LT'=>'<', 'OP_LTE'=>'<=', 'OP_GT'=>'>', 'OP_GTE'=>'>=', 'OP_LIKE'=>'like') ); try { return $map[$type][$val]; }catch(Exception $e) { return $val; } } echo _map('comparison_operator','OP_EQ');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5R5Rt
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                               '_map'
          1        SEND_VAL                                                 'comparison_operator'
          2        SEND_VAL                                                 'OP_EQ'
          3        DO_FCALL                                      0  $0      
          4        ECHO                                                     $0
          5      > RETURN                                                   1

Function _map:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 7
Branch analysis from position: 7
2 jumps found. (Code = 107) Position 1 = 8, Position 2 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5R5Rt
function name:  _map
number of ops:  10
compiled vars:  !0 = $type, !1 = $val, !2 = $map, !3 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        ASSIGN                                                   !2, <array>
   15     3        FETCH_DIM_R                                      ~5      !2, !0
          4        FETCH_DIM_R                                      ~6      ~5, !1
          5      > RETURN                                                   ~6
          6*       JMP                                                      ->9
   16     7  E > > CATCH                                       last         'Exception'
   17     8    > > RETURN                                                   !1
   19     9*     > RETURN                                                   null

End of function _map

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.92 ms | 1397 KiB | 14 Q