3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function ($errno, $errstr, $errfile, $errline) { if ($errno == E_RECOVERABLE_ERROR) { throw new ErrorException($errstr, 0, $errno, $errfile, $errline); } }); function func(stdClass $obj) { var_dump($obj); } try { func(123); } catch (ErrorException $ex) { echo "ErrorException: {$ex->getMessage()}\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 8
Branch analysis from position: 8
2 jumps found. (Code = 107) Position 1 = 9, Position 2 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ba3v2
function name:  (null)
number of ops:  16
compiled vars:  !0 = $ex
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'set_error_handler'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FBa3v2%3A2%240'
    7     2        SEND_VAL                                                 ~1
          3        DO_ICALL                                                 
   16     4        INIT_FCALL                                               'func'
          5        SEND_VAL                                                 123
          6        DO_FCALL                                      0          
          7      > JMP                                                      ->15
   18     8  E > > CATCH                                       last         'ErrorException'
   20     9    >   ROPE_INIT                                     3  ~6      'ErrorException%3A+'
         10        INIT_METHOD_CALL                                         !0, 'getMessage'
         11        DO_FCALL                                      0  $4      
         12        ROPE_ADD                                      1  ~6      ~6, $4
         13        ROPE_END                                      2  ~5      ~6, '%0A'
         14        ECHO                                                     ~5
   21    15    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FBa3v2%3A2%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 14
Branch analysis from position: 6
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ba3v2
function name:  {closure}
number of ops:  15
compiled vars:  !0 = $errno, !1 = $errstr, !2 = $errfile, !3 = $errline
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    3     4        IS_EQUAL                                                 !0, 4096
          5      > JMPZ                                                     ~4, ->14
    5     6    >   NEW                                              $5      'ErrorException'
          7        SEND_VAR_EX                                              !1
          8        SEND_VAL_EX                                              0
          9        SEND_VAR_EX                                              !0
         10        SEND_VAR_EX                                              !2
         11        SEND_VAR_EX                                              !3
         12        DO_FCALL                                      0          
         13      > THROW                                         0          $5
    7    14    > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FBa3v2%3A2%240

Function func:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ba3v2
function name:  func
number of ops:  5
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   11     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   12     4      > RETURN                                                   null

End of function func

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.24 ms | 1403 KiB | 18 Q