3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace My\Classes; Class MyClass { private static $myProperty = "test"; public static function getProp(){ return self::myProperty; } } namespace My\Classes; use My\Classes\MyClass; //The class above Class MyOtherClass { public static function getProperty(){ return MyClass::getProp(); //Returns Hello } } use My\Classes\MyOtherClass; echo MyOtherClass::getProperty();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A1mSF
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   INIT_STATIC_METHOD_CALL                                  'My%5CClasses%5CMyOtherClass', 'getProperty'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3      > RETURN                                                   1

Class My\Classes\MyClass:
Function getprop:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A1mSF
function name:  getProp
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_CLASS_CONSTANT                             ~0      'myProperty'
          1      > RETURN                                                   ~0
    9     2*     > RETURN                                                   null

End of function getprop

End of class My\Classes\MyClass.

Class My\Classes\MyOtherClass:
Function getproperty:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A1mSF
function name:  getProperty
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_STATIC_METHOD_CALL                                  'My%5CClasses%5CMyClass', 'getProp'
          1        DO_FCALL                                      0  $0      
          2      > RETURN                                                   $0
   20     3*     > RETURN                                                   null

End of function getproperty

End of class My\Classes\MyOtherClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.53 ms | 1393 KiB | 13 Q