3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $parent; } $a = new Foo(); $a->parent = new stdClass(); $a->parent->x = [$a]; print_r($a); $arr = [ [$a], $a, ]; print_r($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Bv4UB
function name:  (null)
number of ops:  22
compiled vars:  !0 = $a, !1 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $2      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    8     3        NEW                                              $6      'stdClass'
          4        DO_FCALL                                      0          
          5        ASSIGN_OBJ                                               !0, 'parent'
          6        OP_DATA                                                  $6
    9     7        INIT_ARRAY                                       ~10     !0
          8        FETCH_OBJ_W                                      $8      !0, 'parent'
          9        ASSIGN_OBJ                                               $8, 'x'
         10        OP_DATA                                                  ~10
   11    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
   14    14        INIT_ARRAY                                       ~12     !0
         15        INIT_ARRAY                                       ~13     ~12
   15    16        ADD_ARRAY_ELEMENT                                ~13     !0
   13    17        ASSIGN                                                   !1, ~13
   18    18        INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.73 ms | 1010 KiB | 14 Q