3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f() { return 10; } class A { const X = 10; } class B extends A { // self and parent are allowed // const int Y = 10 * parent::X; // const int Z = self::Y + 1; private function foo() { return parent::X; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2bBgu
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E > > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2bBgu
function name:  f
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                   10
    5     1*     > RETURN                                                   null

End of function f

Class A: [no user functions]
Class B:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2bBgu
function name:  foo
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   FETCH_CLASS_CONSTANT                             ~0      'X'
          1      > RETURN                                                   ~0
   18     2*     > RETURN                                                   null

End of function foo

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.38 ms | 1393 KiB | 13 Q