3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static $my_static = 'foo'; public function staticValue() { return self::$my_static; } } $bar = new Foo; echo $bar::$my_static;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ke8EJ
function name:  (null)
number of ops:  7
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     3        FETCH_CLASS                                   0  $4      !0
          4        FETCH_STATIC_PROP_R          global lock         ~5      'my_static'
          5        ECHO                                                     ~5
          6      > RETURN                                                   1

Class Foo:
Function staticvalue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ke8EJ
function name:  staticValue
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'my_static'
          1      > RETURN                                                   ~0
    8     2*     > RETURN                                                   null

End of function staticvalue

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.37 ms | 1393 KiB | 13 Q