3v4l.org

run code in 300+ PHP versions simultaneously
<?php const MyClass = 1; class MyClass { public $val; static function __invokeStatic($instance) { echo $instance->val; } public function __construct($val) { $this->val = $val; } } function MyClass($instance) { MyClass::__invokeStatic($instance); } MyClass(new MyClass(MyClass));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/00ukA
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CONST                                            'MyClass', 1
   25     1        INIT_FCALL                                               'myclass'
          2        NEW                                              $0      'MyClass'
          3        FETCH_CONSTANT                                   ~1      'MyClass'
          4        SEND_VAL_EX                                              ~1
          5        DO_FCALL                                      0          
          6        SEND_VAR                                                 $0
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Function myclass:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/00ukA
function name:  MyClass
number of ops:  5
compiled vars:  !0 = $instance
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
   22     1        INIT_STATIC_METHOD_CALL                                  'MyClass', '__invokeStatic'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0          
   23     4      > RETURN                                                   null

End of function myclass

Class MyClass:
Function __invokestatic:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/00ukA
function name:  __invokeStatic
number of ops:  4
compiled vars:  !0 = $instance
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   11     1        FETCH_OBJ_R                                      ~1      !0, 'val'
          2        ECHO                                                     ~1
   12     3      > RETURN                                                   null

End of function __invokestatic

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/00ukA
function name:  __construct
number of ops:  4
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   16     1        ASSIGN_OBJ                                               'val'
          2        OP_DATA                                                  !0
   17     3      > RETURN                                                   null

End of function __construct

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
187.8 ms | 1399 KiB | 14 Q