3v4l.org

run code in 300+ PHP versions simultaneously
<?php spl_autoload_register(function () { var_dump(func_get_args()); }); try { new Foo(); } catch(Throwable $t) { var_dump($t); } if (true) { class Foo {} var_dump(new Foo()); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 19
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
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
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 19
Branch analysis from position: 13
Branch analysis from position: 19
filename:       /in/iSXM2
function name:  (null)
number of ops:  20
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'spl_autoload_register'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FiSXM2%3A3%240'
    5     2        SEND_VAL                                                 ~1
          3        DO_ICALL                                                 
    8     4        NEW                                              $3      'Foo'
          5        DO_FCALL                                      0          
          6        FREE                                                     $3
          7      > JMP                                                      ->12
    9     8  E > > CATCH                                       last         'Throwable'
   10     9    >   INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
   13    12    > > JMPZ                                                     <true>, ->19
   14    13    >   DECLARE_CLASS                                            'foo'
   15    14        INIT_FCALL                                               'var_dump'
         15        NEW                                              $6      'Foo'
         16        DO_FCALL                                      0          
         17        SEND_VAR                                                 $6
         18        DO_ICALL                                                 
   16    19    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FiSXM2%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iSXM2
function name:  {closure}
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'var_dump'
          1        FUNC_GET_ARGS                                    ~0      
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
    5     4      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FiSXM2%3A3%240

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.36 ms | 1396 KiB | 17 Q