3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static function staticValue() { return "static output"; } } print Foo::staticValue . "\n"; $foo = new Foo(); print $foo->staticValue;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DmZ5e
function name:  (null)
number of ops:  9
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_CLASS_CONSTANT                             ~1      'Foo', 'staticValue'
          1        CONCAT                                           ~2      ~1, '%0A'
          2        ECHO                                                     ~2
   10     3        NEW                                              $3      'Foo'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $3
   11     6        FETCH_OBJ_R                                      ~6      !0, 'staticValue'
          7        ECHO                                                     ~6
          8      > RETURN                                                   1

Class Foo:
Function staticvalue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DmZ5e
function name:  staticValue
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   'static+output'
    6     1*     > RETURN                                                   null

End of function staticvalue

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.68 ms | 1393 KiB | 13 Q