3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test extends \ArrayIterator { } $array = new Test(); $array->offsetSet('foo', 'Hello'); $array->offsetSet('bar', 'World'); echo $array['foo']; echo $array['bar'];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vVBQM
function name:  (null)
number of ops:  16
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    7     3        INIT_METHOD_CALL                                         !0, 'offsetSet'
          4        SEND_VAL_EX                                              'foo'
          5        SEND_VAL_EX                                              'Hello'
          6        DO_FCALL                                      0          
    8     7        INIT_METHOD_CALL                                         !0, 'offsetSet'
          8        SEND_VAL_EX                                              'bar'
          9        SEND_VAL_EX                                              'World'
         10        DO_FCALL                                      0          
   10    11        FETCH_DIM_R                                      ~6      !0, 'foo'
         12        ECHO                                                     ~6
   11    13        FETCH_DIM_R                                      ~7      !0, 'bar'
         14        ECHO                                                     ~7
         15      > RETURN                                                   1

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.4 ms | 1393 KiB | 13 Q