3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { static public $static_property; public $instance_property; public function instance_method() { echo $this->instance_property; } public static function static_method() { echo self::$static_property; } } Foo::$static_property = "static foo!<br>\n"; echo Foo::static_method(); $foo = new Foo(); $foo->instance_property = "instance property!<br>\n"; echo $foo->instance_method();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MbWDW
function name:  (null)
number of ops:  14
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   ASSIGN_STATIC_PROP                                       'static_property', 'Foo'
          1        OP_DATA                                                  'static+foo%21%3Cbr%3E%0A'
   20     2        INIT_STATIC_METHOD_CALL                                  'Foo', 'static_method'
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
   22     5        NEW                                              $3      'Foo'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $3
   23     8        ASSIGN_OBJ                                               !0, 'instance_property'
          9        OP_DATA                                                  'instance+property%21%3Cbr%3E%0A'
   24    10        INIT_METHOD_CALL                                         !0, 'instance_method'
         11        DO_FCALL                                      0  $7      
         12        ECHO                                                     $7
         13      > RETURN                                                   1

Class Foo:
Function instance_method:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MbWDW
function name:  instance_method
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_OBJ_R                                      ~0      'instance_property'
          1        ECHO                                                     ~0
   11     2      > RETURN                                                   null

End of function instance_method

Function static_method:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MbWDW
function name:  static_method
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'static_property'
          1        ECHO                                                     ~0
   16     2      > RETURN                                                   null

End of function static_method

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.47 ms | 1394 KiB | 13 Q