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 \ns1\MyClass { const CONST1=7; const CONST2=8; const CONST3=9; public static function myFunc() { parent::parent::myFunc(); } } \ns1\MyCLass::myFunc(); \ns2\MyCLass::myFunc(); \ns3\MyCLass::myFunc(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/csrRi
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   36     0  E >   INIT_STATIC_METHOD_CALL                                  'ns1%5CMyCLass', 'myFunc'
          1        DO_FCALL                                      0          
   37     2        INIT_STATIC_METHOD_CALL                                  'ns2%5CMyCLass', 'myFunc'
          3        DO_FCALL                                      0          
   38     4        INIT_STATIC_METHOD_CALL                                  'ns3%5CMyCLass', 'myFunc'
          5        DO_FCALL                                      0          
   39     6      > 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/csrRi
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/csrRi
function name:  myFunc
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_STATIC_METHOD_CALL                                  'myFunc'
          1        DO_FCALL                                      0          
   22     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/csrRi
function name:  myFunc
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   FETCH_CLASS_CONSTANT                             ~0      'parent'
          1        FETCH_CLASS                                   0  $1      ~0
          2        INIT_STATIC_METHOD_CALL                                  $1, 'myFunc'
          3        DO_FCALL                                      0          
   33     4      > RETURN                                                   null

End of function myfunc

End of class ns3\MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.86 ms | 939 KiB | 14 Q