3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $a; public function __construct($a) { $this->a = $a; } public function getA() { return $this->a; } } class B { protected $name; public function __construct($name) { $this->name = $name; } } $b = new B('test'); $a = new A($b); $a1 = new A($b); $s = serialize( array( // Acl:serialize (line 260) [ // classFieldAces 'fieldOne' => [$a], 'fieldTwo' => [$a1], ] ) ); var_dump($s); $uns = unserialize($s); var_dump($uns[0]['fieldOne'][0], $uns[0]['fieldTwo'][0]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r4fC8
function name:  (null)
number of ops:  39
compiled vars:  !0 = $b, !1 = $a, !2 = $a1, !3 = $s, !4 = $uns
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   NEW                                              $5      'B'
          1        SEND_VAL_EX                                              'test'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $5
   28     4        NEW                                              $8      'A'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $8
   29     8        NEW                                              $11     'A'
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !2, $11
   31    12        INIT_FCALL                                               'serialize'
   34    13        INIT_ARRAY                                       ~14     !1
         14        INIT_ARRAY                                       ~15     ~14, 'fieldOne'
   35    15        INIT_ARRAY                                       ~16     !2
         16        ADD_ARRAY_ELEMENT                                ~15     ~16, 'fieldTwo'
         17        INIT_ARRAY                                       ~17     ~15
         18        SEND_VAL                                                 ~17
         19        DO_ICALL                                         $18     
   31    20        ASSIGN                                                   !3, $18
   39    21        INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !3
         23        DO_ICALL                                                 
   41    24        INIT_FCALL                                               'unserialize'
         25        SEND_VAR                                                 !3
         26        DO_ICALL                                         $21     
         27        ASSIGN                                                   !4, $21
   44    28        INIT_FCALL                                               'var_dump'
         29        FETCH_DIM_R                                      ~23     !4, 0
         30        FETCH_DIM_R                                      ~24     ~23, 'fieldOne'
         31        FETCH_DIM_R                                      ~25     ~24, 0
         32        SEND_VAL                                                 ~25
         33        FETCH_DIM_R                                      ~26     !4, 0
         34        FETCH_DIM_R                                      ~27     ~26, 'fieldTwo'
         35        FETCH_DIM_R                                      ~28     ~27, 0
         36        SEND_VAL                                                 ~28
         37        DO_ICALL                                                 
         38      > RETURN                                                   1

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

End of function __construct

Function geta:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r4fC8
function name:  getA
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   FETCH_OBJ_R                                      ~0      'a'
          1      > RETURN                                                   ~0
   14     2*     > RETURN                                                   null

End of function geta

End of class A.

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

End of function __construct

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
128.36 ms | 1405 KiB | 19 Q