3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo{ public static $foo; public static function inst() { self::$foo = new self; } } Foo::inst(); var_dump(Foo::$foo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uRktP
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_STATIC_METHOD_CALL                                  'Foo', 'inst'
          1        DO_FCALL                                      0          
   12     2        INIT_FCALL                                               'var_dump'
          3        FETCH_STATIC_PROP_R          unknown             ~1      'foo'
          4        SEND_VAL                                                 ~1
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

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

End of function inst

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.92 ms | 1394 KiB | 15 Q