3v4l.org

run code in 300+ PHP versions simultaneously
<?php $storage = new SplObjectStorage(); $storage[new stdClass] = 'foo'; $storage[new stdClass] = 'bar'; $storage[new stdClass] = 'baz'; foreach ($storage as $key => $value) { var_dump(array($key, $value)); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 24
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 24
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/YuRlr
function name:  (null)
number of ops:  26
compiled vars:  !0 = $storage, !1 = $value, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'SplObjectStorage'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    5     3        NEW                                              $6      'stdClass'
          4        DO_FCALL                                      0          
          5        ASSIGN_DIM                                               !0, $6
          6        OP_DATA                                                  'foo'
    6     7        NEW                                              $9      'stdClass'
          8        DO_FCALL                                      0          
          9        ASSIGN_DIM                                               !0, $9
         10        OP_DATA                                                  'bar'
    7    11        NEW                                              $12     'stdClass'
         12        DO_FCALL                                      0          
         13        ASSIGN_DIM                                               !0, $12
         14        OP_DATA                                                  'baz'
    9    15      > FE_RESET_R                                       $15     !0, ->24
         16    > > FE_FETCH_R                                       ~16     $15, !1, ->24
         17    >   ASSIGN                                                   !2, ~16
   10    18        INIT_FCALL                                               'var_dump'
         19        INIT_ARRAY                                       ~18     !2
         20        ADD_ARRAY_ELEMENT                                ~18     !1
         21        SEND_VAL                                                 ~18
         22        DO_ICALL                                                 
    9    23      > JMP                                                      ->16
         24    >   FE_FREE                                                  $15
   11    25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.13 ms | 1400 KiB | 15 Q