3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace ns1 { class MyClass { const CONST1=1; const CONST2=2; const CONST3=3; public static function myFunc() { } } } namespace ns2 { class MyClass extends \ns1\MyClass { const CONST1=4; const CONST2=5; const CONST3=6; public static function myFunc() { parent::myFunc(); } } } namespace ns3 { class MyClass extends \ns2\MyClass { const CONST1=7; const CONST2=8; const CONST3=9; public static function myFunc() { parent::parent::myFunc(); } } echo \ns1\MyCLass::CONST1; echo \ns2\MyCLass::CONST1; echo \ns3\MyCLass::CONST1; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4nSYT
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   35     0  E >   ECHO                                                     1
   36     1        ECHO                                                     4
   37     2        ECHO                                                     7
   38     3      > RETURN                                                   1

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

End of function myfunc

End of class ns1\MyClass.

Class ns2\MyClass:
Function myfunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4nSYT
function name:  myFunc
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_STATIC_METHOD_CALL                                  'myFunc'
          1        DO_FCALL                                      0          
   21     2      > RETURN                                                   null

End of function myfunc

End of class ns2\MyClass.

Class ns3\MyClass:
Function myfunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4nSYT
function name:  myFunc
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E >   FETCH_CLASS_CONSTANT                             ~0      'parent'
          1        FETCH_CLASS                                   0  $1      ~0
          2        INIT_STATIC_METHOD_CALL                                  $1, 'myFunc'
          3        DO_FCALL                                      0          
   32     4      > RETURN                                                   null

End of function myfunc

End of class ns3\MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.63 ms | 1394 KiB | 13 Q