3v4l.org

run code in 300+ PHP versions simultaneously
<?php class xxyy { } class xx { function __construct() { return new xxyy(); } } $x= new xx(); $y= $x->__construct(); print_r($x); print_r($y);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rXn2L
function name:  (null)
number of ops:  13
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                                                 
   12     9        INIT_FCALL                                               'print_r'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Class xxyy: [no user functions]
Class xx:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rXn2L
function name:  __construct
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 __construct

End of class xx.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.91 ms | 1395 KiB | 15 Q