3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($foo) { echo "Executing foo\n"; } set_error_handler(function($errno, $errstr) { throw new Exception( $errstr); }); try { foo(); } catch (Exception $e) { echo $e->getMessage(), "\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
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/ZlUYW
function name:  (null)
number of ops:  13
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'set_error_handler'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FZlUYW%3A7%240'
   10     2        SEND_VAL                                                 ~1
          3        DO_ICALL                                                 
   13     4        INIT_FCALL                                               'foo'
          5        DO_FCALL                                      0          
          6      > JMP                                                      ->12
   14     7  E > > CATCH                                       last         'Exception'
   15     8    >   INIT_METHOD_CALL                                         !0, 'getMessage'
          9        DO_FCALL                                      0  $4      
         10        ECHO                                                     $4
         11        ECHO                                                     '%0A'
   16    12    > > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZlUYW
function name:  foo
number of ops:  3
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ECHO                                                     'Executing+foo%0A'
    5     2      > RETURN                                                   null

End of function foo

Function %00%7Bclosure%7D%2Fin%2FZlUYW%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/ZlUYW
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $errno, !1 = $errstr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    9     2        NEW                                              $2      'Exception'
          3        SEND_VAR_EX                                              !1
          4        DO_FCALL                                      0          
          5      > THROW                                         0          $2
   10     6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FZlUYW%3A7%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.83 ms | 1399 KiB | 16 Q