3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Builder { /** @Column(type="string") */ protected $id; /** @Column(type="string") */ protected $name; /** @ManyToOne(targetEntity="User") * @JoinColumn(name="created_by", referencedColumnName="id") */ protected $created_by; /** @ManyToOne(targetEntity="User") * @JoinColumn(name="updated_by", referencedColumnName="id") */ protected $updated_by; public function __construct(array $input) { $this->id = $input['id']; $this->name = $input['name']; $this->created_by = $input['created_by']; $this->updated_by = $input['updated_by']; } } class User { /** @Column(type="string") */ protected $id; /** @Column(type="string") */ protected $name; public function __construct(array $input) { $this->id = $input['id']; $this->name = $input['name']; } } $input = []; $input['id'] = 1; $input['name'] = 'TEST'; $input['created_by'] = new User(['id' => 1, 'name' => 'User']); $input['updated_by'] = new User(['id' => 1, 'name' => 'User']); $builder = new Builder($input); $reflectClass = new ReflectionClass();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qLQVn
function name:  (null)
number of ops:  23
compiled vars:  !0 = $input, !1 = $builder, !2 = $reflectClass
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   45     0  E >   ASSIGN                                                   !0, <array>
   47     1        ASSIGN_DIM                                               !0, 'id'
          2        OP_DATA                                                  1
   48     3        ASSIGN_DIM                                               !0, 'name'
          4        OP_DATA                                                  'TEST'
   49     5        NEW                                              $7      'User'
          6        SEND_VAL_EX                                              <array>
          7        DO_FCALL                                      0          
          8        ASSIGN_DIM                                               !0, 'created_by'
          9        OP_DATA                                                  $7
   50    10        NEW                                              $10     'User'
         11        SEND_VAL_EX                                              <array>
         12        DO_FCALL                                      0          
         13        ASSIGN_DIM                                               !0, 'updated_by'
         14        OP_DATA                                                  $10
   52    15        NEW                                              $12     'Builder'
         16        SEND_VAR_EX                                              !0
         17        DO_FCALL                                      0          
         18        ASSIGN                                                   !1, $12
   54    19        NEW                                              $15     'ReflectionClass'
         20        DO_FCALL                                      0          
         21        ASSIGN                                                   !2, $15
         22      > RETURN                                                   1

Class Builder:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qLQVn
function name:  __construct
number of ops:  14
compiled vars:  !0 = $input
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
   23     1        FETCH_DIM_R                                      ~2      !0, 'id'
          2        ASSIGN_OBJ                                               'id'
          3        OP_DATA                                                  ~2
   24     4        FETCH_DIM_R                                      ~4      !0, 'name'
          5        ASSIGN_OBJ                                               'name'
          6        OP_DATA                                                  ~4
   25     7        FETCH_DIM_R                                      ~6      !0, 'created_by'
          8        ASSIGN_OBJ                                               'created_by'
          9        OP_DATA                                                  ~6
   26    10        FETCH_DIM_R                                      ~8      !0, 'updated_by'
         11        ASSIGN_OBJ                                               'updated_by'
         12        OP_DATA                                                  ~8
   27    13      > RETURN                                                   null

End of function __construct

End of class Builder.

Class User:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qLQVn
function name:  __construct
number of ops:  8
compiled vars:  !0 = $input
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   38     0  E >   RECV                                             !0      
   40     1        FETCH_DIM_R                                      ~2      !0, 'id'
          2        ASSIGN_OBJ                                               'id'
          3        OP_DATA                                                  ~2
   41     4        FETCH_DIM_R                                      ~4      !0, 'name'
          5        ASSIGN_OBJ                                               'name'
          6        OP_DATA                                                  ~4
   42     7      > RETURN                                                   null

End of function __construct

End of class User.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.7 ms | 1399 KiB | 13 Q