3v4l.org

run code in 300+ PHP versions simultaneously
<?php class OtherClass extends MyClass { public static $my_static = 'static var'; public static function doubleColon() { echo parent::CONST_VALUE . "\n"; echo self::$my_static . "\n"; } } $classname = 'OtherClass'; echo $classname::doubleColon(); // As of PHP 5.3.0 OtherClass::doubleColon();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ri9ql
function name:  (null)
number of ops:  9
compiled vars:  !0 = $classname
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'otherclass', 'myclass'
   13     1        ASSIGN                                                   !0, 'OtherClass'
   14     2        FETCH_CLASS                                   0  $2      !0
          3        INIT_STATIC_METHOD_CALL                                  $2, 'doubleColon'
          4        DO_FCALL                                      0  $3      
          5        ECHO                                                     $3
   16     6        INIT_STATIC_METHOD_CALL                                  'OtherClass', 'doubleColon'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Class OtherClass:
Function doublecolon:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ri9ql
function name:  doubleColon
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_CLASS_CONSTANT                             ~0      'CONST_VALUE'
          1        CONCAT                                           ~1      ~0, '%0A'
          2        ECHO                                                     ~1
    9     3        FETCH_STATIC_PROP_R          unknown             ~2      'my_static'
          4        CONCAT                                           ~3      ~2, '%0A'
          5        ECHO                                                     ~3
   10     6      > RETURN                                                   null

End of function doublecolon

End of class OtherClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.3 ms | 1393 KiB | 13 Q