3v4l.org

run code in 300+ PHP versions simultaneously
<?php class xxyy { } class xx { function __constructor() { return new xxyy(); } } $x= new xx(); $y= $x->__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/pdX48
function name:  (null)
number of ops:  15
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        INIT_METHOD_CALL                                         !0, '__construct'
          4        DO_FCALL                                      0  $5      
          5        ASSIGN                                                   !1, $5
   11     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $7      
          9        ECHO                                                     $7
   12    10        INIT_FCALL                                               'print_r'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $8      
         13        ECHO                                                     $8
         14      > 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/pdX48
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:
148.94 ms | 1395 KiB | 15 Q