3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Y { private $x; function __construct(X $x) { $this->x = $x; } } class X { private $i; private $y; function __construct($i) { $this->i = $i; $this->y = new Y($this); } function __destruct() { echo "I'm done {$this->i} !\n"; } } function make_x($i) { new X($i); } for ($i = 0; $i < 10; $i++) { echo "Making X $i\n"; make_x($i); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 2
Branch analysis from position: 12
Branch analysis from position: 2
filename:       /in/013JD
function name:  (null)
number of ops:  13
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->10
   18     2    >   ROPE_INIT                                     3  ~3      'Making+X+'
          3        ROPE_ADD                                      1  ~3      ~3, !0
          4        ROPE_END                                      2  ~2      ~3, '%0A'
          5        ECHO                                                     ~2
   19     6        INIT_FCALL                                               'make_x'
          7        SEND_VAR                                                 !0
          8        DO_FCALL                                      0          
   17     9        PRE_INC                                                  !0
         10    >   IS_SMALLER                                               !0, 10
         11      > JMPNZ                                                    ~7, ->2
   20    12    > > RETURN                                                   1

Function make_x:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/013JD
function name:  make_x
number of ops:  6
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1        NEW                                              $1      'X'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        FREE                                                     $1
          5      > RETURN                                                   null

End of function make_x

Class Y:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/013JD
function name:  __construct
number of ops:  4
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        ASSIGN_OBJ                                               'x'
          2        OP_DATA                                                  !0
          3      > RETURN                                                   null

End of function __construct

End of class Y.

Class X:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/013JD
function name:  __construct
number of ops:  10
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        ASSIGN_OBJ                                               'i'
          2        OP_DATA                                                  !0
          3        NEW                                              $3      'Y'
          4        FETCH_THIS                                       $4      
          5        SEND_VAR_EX                                              $4
          6        DO_FCALL                                      0          
          7        ASSIGN_OBJ                                               'y'
          8        OP_DATA                                                  $3
          9      > RETURN                                                   null

End of function __construct

Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/013JD
function name:  __destruct
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ROPE_INIT                                     3  ~2      'I%27m+done+'
          1        FETCH_OBJ_R                                      ~0      'i'
          2        ROPE_ADD                                      1  ~2      ~2, ~0
          3        ROPE_END                                      2  ~1      ~2, '+%21%0A'
          4        ECHO                                                     ~1
          5      > RETURN                                                   null

End of function __destruct

End of class X.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.63 ms | 1403 KiB | 14 Q