3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace ns1 { class MyClass { const CONST1=1; const CONST2=2; public static function myFunc() { } } } namespace ns2 { class MyClass extends \ns1\MyClass { const CONST2=2; public static function myFunc() { parent::myFunc(); } } } namespace ns3 { class MyClass extends \ns1\MyClass { const CONST3=3; public static function myFunc() { 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/S3NDJ
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   INIT_STATIC_METHOD_CALL                                  'ns1%5CMyCLass', 'myFunc'
          1        DO_FCALL                                      0          
   30     2        INIT_STATIC_METHOD_CALL                                  'ns2%5CMyCLass', 'myFunc'
          3        DO_FCALL                                      0          
   31     4        INIT_STATIC_METHOD_CALL                                  'ns3%5CMyCLass', 'myFunc'
          5        DO_FCALL                                      0          
   32     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/S3NDJ
function name:  myFunc
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     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/S3NDJ
function name:  myFunc
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_STATIC_METHOD_CALL                                  'myFunc'
          1        DO_FCALL                                      0          
   18     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/S3NDJ
function name:  myFunc
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   INIT_STATIC_METHOD_CALL                                  'myFunc'
          1        DO_FCALL                                      0          
   26     2      > RETURN                                                   null

End of function myfunc

End of class ns3\MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.16 ms | 1394 KiB | 13 Q