3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Position { public function __construct($param1, $param2, $param3){ return $this; } } class Starbase { public $Position; public $Capacity; public function __construct(Position $position, $capacity){ $this->Position = $position; $this->Capacity = $capacity; } } $starbasePos = new Position(90,50,15); $starbase = new Starbase($starbasePos, 15);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EeHbh
function name:  (null)
number of ops:  12
compiled vars:  !0 = $starbasePos, !1 = $starbase
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $2      'Position'
          1        SEND_VAL_EX                                              90
          2        SEND_VAL_EX                                              50
          3        SEND_VAL_EX                                              15
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
   21     6        NEW                                              $5      'Starbase'
          7        SEND_VAR_EX                                              !0
          8        SEND_VAL_EX                                              15
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !1, $5
         11      > RETURN                                                   1

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

End of function __construct

End of class Position.

Class Starbase:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EeHbh
function name:  __construct
number of ops:  7
compiled vars:  !0 = $position, !1 = $capacity
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   15     2        ASSIGN_OBJ                                               'Position'
          3        OP_DATA                                                  !0
   16     4        ASSIGN_OBJ                                               'Capacity'
          5        OP_DATA                                                  !1
   17     6      > RETURN                                                   null

End of function __construct

End of class Starbase.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.37 ms | 1395 KiB | 13 Q