3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public $bars = []; } class bar { public $field; } $foo = new foo(); $bar = new bar(); $bar->field = 'hello'; $foo->bars[] = $bar; print_r($foo->bars);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kEigS
function name:  (null)
number of ops:  16
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $2      'foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   13     3        NEW                                              $5      'bar'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   14     6        ASSIGN_OBJ                                               !1, 'field'
          7        OP_DATA                                                  'hello'
   15     8        FETCH_OBJ_W                                      $9      !0, 'bars'
          9        ASSIGN_DIM                                               $9
         10        OP_DATA                                                  !1
   17    11        INIT_FCALL                                               'print_r'
         12        FETCH_OBJ_R                                      ~11     !0, 'bars'
         13        SEND_VAL                                                 ~11
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Class foo: [no user functions]
Class bar: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.75 ms | 1385 KiB | 15 Q