3v4l.org

run code in 300+ PHP versions simultaneously
<?php class YourClass { function __construct() { $x = function() { echo __CLASS__; }; $x(); } } class MyClass extends YourClass { function __construct() { parent::__construct(); } } $x = new MyClass();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BjYdm
function name:  (null)
number of ops:  4
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $1      'MyClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
          3      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FBjYdm%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BjYdm
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ECHO                                                     'YourClass'
    9     1      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FBjYdm%3A7%240

Class YourClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BjYdm
function name:  __construct
number of ops:  5
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FBjYdm%3A7%240'
          1        ASSIGN                                                   !0, ~1
   11     2        INIT_DYNAMIC_CALL                                        !0
          3        DO_FCALL                                      0          
   12     4      > RETURN                                                   null

End of function __construct

End of class YourClass.

Class MyClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BjYdm
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_STATIC_METHOD_CALL                                  
          1        DO_FCALL                                      0          
   19     2      > RETURN                                                   null

End of function __construct

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.75 ms | 1394 KiB | 13 Q