3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Handler { static function staticMethod() { echo 'ok'; } } class Foo { function __construct() { $this->modelHandler = 'Handler'; $this->modelHandler::staticMethod(); } } new Foo;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mkPYY
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E >   NEW                                                  $0      'Foo'
          1        DO_FCALL                                          0          
          2        FREE                                                         $0
          3      > RETURN                                                       1

Class Handler:
Function staticmethod:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mkPYY
function name:  staticMethod
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                         'ok'
    6     1      > RETURN                                                       null

End of function staticmethod

End of class Handler.

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mkPYY
function name:  __construct
number of ops:  7
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   ASSIGN_OBJ                                                   'modelHandler'
          1        OP_DATA                                                      'Handler'
   12     2        FETCH_OBJ_R                                          ~1      'modelHandler'
          3        FETCH_CLASS                                       0  $2      ~1
          4        INIT_STATIC_METHOD_CALL                                      $2, 'staticMethod'
          5        DO_FCALL                                          0          
   13     6      > RETURN                                                       null

End of function __construct

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
123.02 ms | 475 KiB | 7 Q