3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { static $test; function __construct (){ self::$test = 'aaa'; throw new \Exception; } } try { $Foo = new Foo; } catch (\Exception $e) { echo Foo::$test; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
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/mYrHi
function name:  (null)
number of ops:  8
compiled vars:  !0 = $Foo, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $2      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
          3      > JMP                                                      ->7
   15     4  E > > CATCH                                       last         'Exception'
   16     5    >   FETCH_STATIC_PROP_R          unknown             ~5      'test'
          6        ECHO                                                     ~5
   18     7    > > RETURN                                                   1

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/mYrHi
function name:  __construct
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN_STATIC_PROP                                       'test'
          1        OP_DATA                                                  'aaa'
    8     2        NEW                                              $1      'Exception'
          3        DO_FCALL                                      0          
          4      > THROW                                         0          $1
    9     5*     > RETURN                                                   null

End of function __construct

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.76 ms | 1393 KiB | 13 Q