3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.86 ms | 1395 KiB | 15 Q