3v4l.org

run code in 300+ PHP versions simultaneously
<?php $object = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); $foo = 'websocket'; $object->{$foo} = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS); $object = &$object->{$foo}; echo 'success';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5qSOS
function name:  (null)
number of ops:  16
compiled vars:  !0 = $object, !1 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'ArrayObject'
          1        SEND_VAL_EX                                              <array>
          2        SEND_VAL_EX                                              2
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
    4     5        ASSIGN                                                   !1, 'websocket'
    5     6        NEW                                              $7      'ArrayObject'
          7        SEND_VAL_EX                                              <array>
          8        SEND_VAL_EX                                              2
          9        DO_FCALL                                      0          
         10        ASSIGN_OBJ                                               !0, !1
         11        OP_DATA                                                  $7
    6    12        FETCH_OBJ_W                                      $9      !0, !1
         13        ASSIGN_REF                                               !0, $9
    8    14        ECHO                                                     'success'
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.69 ms | 998 KiB | 13 Q