3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { public function __construct() { return $this; } } class init { public function __construct(test $test) { return $this; } } $init = new init(new test()); var_dump($init);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lIPJl
function name:  (null)
number of ops:  10
compiled vars:  !0 = $init
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'init'
          1        NEW                                              $2      'test'
          2        DO_FCALL                                      0          
          3        SEND_VAR_NO_REF_EX                                       $2
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $1
   16     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

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

End of function __construct

End of class test.

Class init:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lIPJl
function name:  __construct
number of ops:  4
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        FETCH_THIS                                       ~1      
          2      > RETURN                                                   ~1
   11     3*     > RETURN                                                   null

End of function __construct

End of class init.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.42 ms | 1395 KiB | 15 Q