3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { public static function staticMethod() { return 'MyClass::staticMethod called'; } } $className = 'MyClass'; $staticMethodName = 'staticMethod'; //var_dump($className::$staticMethodName()); //var_dump(MyClass::$staticMethodName()); var_dump($className::staticMethod());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dZSIi
function name:  (null)
number of ops:  9
compiled vars:  !0 = $className, !1 = $staticMethodName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, 'MyClass'
    9     1        ASSIGN                                                   !1, 'staticMethod'
   13     2        INIT_FCALL                                               'var_dump'
          3        FETCH_CLASS                                   0  $4      !0
          4        INIT_STATIC_METHOD_CALL                                  $4, 'staticMethod'
          5        DO_FCALL                                      0  $5      
          6        SEND_VAR                                                 $5
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Class MyClass:
Function staticmethod:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dZSIi
function name:  staticMethod
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                   'MyClass%3A%3AstaticMethod+called'
    5     1*     > RETURN                                                   null

End of function staticmethod

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.83 ms | 1398 KiB | 15 Q