3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($v) { if ($v !== 2) { return $v; } throw new Exception('something bad happened'); } $data = array(1, 2, 3); set_error_handler(function ($level, $err) { echo $err; return false; },0); try { var_dump(array_map('foo', $data)); } catch (Exception $e) { var_dump($e->getMessage()); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 14
Branch analysis from position: 14
2 jumps found. (Code = 107) Position 1 = 15, Position 2 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fuGeO
function name:  (null)
number of ops:  21
compiled vars:  !0 = $data, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN                                                   !0, <array>
   15     1        INIT_FCALL                                               'set_error_handler'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FfuGeO%3A15%240'
   20     3        SEND_VAL                                                 ~3
          4        SEND_VAL                                                 0
          5        DO_ICALL                                                 
   23     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'array_map'
          8        SEND_VAL                                                 'foo'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $5      
         11        SEND_VAR                                                 $5
         12        DO_ICALL                                                 
         13      > JMP                                                      ->20
   24    14  E > > CATCH                                       last         'Exception'
   25    15    >   INIT_FCALL                                               'var_dump'
         16        INIT_METHOD_CALL                                         !1, 'getMessage'
         17        DO_FCALL                                      0  $7      
         18        SEND_VAR                                                 $7
         19        DO_ICALL                                                 
   26    20    > > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/fuGeO
function name:  foo
number of ops:  9
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        IS_NOT_IDENTICAL                                         !0, 2
          2      > JMPZ                                                     ~1, ->4
    6     3    > > RETURN                                                   !0
    9     4    >   NEW                                              $2      'Exception'
          5        SEND_VAL_EX                                              'something+bad+happened'
          6        DO_FCALL                                      0          
          7      > THROW                                         0          $2
   10     8*     > RETURN                                                   null

End of function foo

Function %00%7Bclosure%7D%2Fin%2FfuGeO%3A15%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fuGeO
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $level, !1 = $err
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   17     2        ECHO                                                     !1
   19     3      > RETURN                                                   <false>
   20     4*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FfuGeO%3A15%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.38 ms | 1400 KiB | 19 Q