3v4l.org

run code in 300+ PHP versions simultaneously
<?php class xxyy { } class xx { function __constructor() { return new xxyy(); } } $x= new xx(); $y= xx->__construct(); echo print_r($x); echo print_r($y);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T5dm2
function name:  (null)
number of ops:  16
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $2      'xx'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   10     3        FETCH_CONSTANT                                   ~5      'xx'
          4        INIT_METHOD_CALL                                         ~5, '__construct'
          5        DO_FCALL                                      0  $6      
          6        ASSIGN                                                   !1, $6
   11     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $8      
         10        ECHO                                                     $8
   12    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $9      
         14        ECHO                                                     $9
         15      > RETURN                                                   1

Class xxyy: [no user functions]
Class xx:
Function __constructor:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T5dm2
function name:  __constructor
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   NEW                                              $0      'xxyy'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
    7     3*     > RETURN                                                   null

End of function __constructor

End of class xx.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.49 ms | 1395 KiB | 15 Q