3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_time_limit( 1 ); function f() { $foo = null; try { echo "...\n"; class Foo implements Throwable {} } catch ( Error $e ) { echo "----\nCaught error: $e\n----\n"; } } function f1() { f(); } set_exception_handler(function() { echo "----\nException handler: "; var_dump(func_get_args()); echo "----\n"; return false;}); set_error_handler(function() { echo "----\nError handler: "; var_dump(func_get_args()); echo "----\n"; return false;}, 0xffffffff); register_shutdown_function(function() { echo "----\nShutdown function: "; var_dump(error_get_last()); echo "----\n"; }); f1();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tfpvM
function name:  (null)
number of ops:  19
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'set_time_limit'
          1        SEND_VAL                                                 1
          2        DO_ICALL                                                 
   19     3        INIT_FCALL                                               'set_exception_handler'
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FtfpvM%3A19%241'
          5        SEND_VAL                                                 ~1
          6        DO_ICALL                                                 
   20     7        INIT_FCALL                                               'set_error_handler'
          8        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FtfpvM%3A20%242'
          9        SEND_VAL                                                 ~3
         10        SEND_VAL                                                 4294967295
         11        DO_ICALL                                                 
   21    12        INIT_FCALL                                               'register_shutdown_function'
         13        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FtfpvM%3A21%243'
         14        SEND_VAL                                                 ~5
         15        DO_ICALL                                                 
   22    16        INIT_FCALL                                               'f1'
         17        DO_FCALL                                      0          
         18      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 4
Branch analysis from position: 4
2 jumps found. (Code = 107) Position 1 = 5, Position 2 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tfpvM
function name:  f
number of ops:  10
compiled vars:  !0 = $foo, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, null
    8     1        ECHO                                                     '...%0A'
    9     2        DECLARE_CLASS                                            'foo'
          3      > JMP                                                      ->9
   10     4  E > > CATCH                                       last         'Error'
   11     5    >   ROPE_INIT                                     3  ~4      '----%0ACaught+error%3A+'
          6        ROPE_ADD                                      1  ~4      ~4, !1
          7        ROPE_END                                      2  ~3      ~4, '%0A----%0A'
          8        ECHO                                                     ~3
   13     9    > > RETURN                                                   null

End of function f

Function f1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tfpvM
function name:  f1
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                               'f'
          1        DO_FCALL                                      0          
   17     2      > RETURN                                                   null

End of function f1

Function %00%7Bclosure%7D%2Fin%2FtfpvM%3A19%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tfpvM
function name:  {closure}
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   ECHO                                                     '----%0AException+handler%3A+'
          1        INIT_FCALL                                               'var_dump'
          2        FUNC_GET_ARGS                                    ~0      
          3        SEND_VAL                                                 ~0
          4        DO_ICALL                                                 
          5        ECHO                                                     '----%0A'
          6      > RETURN                                                   <false>
          7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FtfpvM%3A19%241

Function %00%7Bclosure%7D%2Fin%2FtfpvM%3A20%242:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tfpvM
function name:  {closure}
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   ECHO                                                     '----%0AError+handler%3A+'
          1        INIT_FCALL                                               'var_dump'
          2        FUNC_GET_ARGS                                    ~0      
          3        SEND_VAL                                                 ~0
          4        DO_ICALL                                                 
          5        ECHO                                                     '----%0A'
          6      > RETURN                                                   <false>
          7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FtfpvM%3A20%242

Function %00%7Bclosure%7D%2Fin%2FtfpvM%3A21%243:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tfpvM
function name:  {closure}
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   ECHO                                                     '----%0AShutdown+function%3A+'
          1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'error_get_last'
          3        DO_ICALL                                         $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6        ECHO                                                     '----%0A'
          7      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FtfpvM%3A21%243

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.34 ms | 1402 KiB | 27 Q