3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = new SplObjectStorage(); $o1 = new StdClass; $o2 = new StdClass; $o3 = new StdClass; $s->attach($o1); $s->attach($o2); $s->attach($o3); foreach($s as $key=>$val){ echo 'key='.$key.' val='.var_dump($val).PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 22, Position 2 = 33
Branch analysis from position: 22
2 jumps found. (Code = 78) Position 1 = 23, Position 2 = 33
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
filename:       /in/6ktbW
function name:  (null)
number of ops:  35
compiled vars:  !0 = $s, !1 = $o1, !2 = $o2, !3 = $o3, !4 = $val, !5 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $6      'SplObjectStorage'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $6
    6     3        NEW                                              $9      'StdClass'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $9
    7     6        NEW                                              $12     'StdClass'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !2, $12
    8     9        NEW                                              $15     'StdClass'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !3, $15
    9    12        INIT_METHOD_CALL                                         !0, 'attach'
         13        SEND_VAR_EX                                              !1
         14        DO_FCALL                                      0          
   10    15        INIT_METHOD_CALL                                         !0, 'attach'
         16        SEND_VAR_EX                                              !2
         17        DO_FCALL                                      0          
   11    18        INIT_METHOD_CALL                                         !0, 'attach'
         19        SEND_VAR_EX                                              !3
         20        DO_FCALL                                      0          
   13    21      > FE_RESET_R                                       $21     !0, ->33
         22    > > FE_FETCH_R                                       ~22     $21, !4, ->33
         23    >   ASSIGN                                                   !5, ~22
   14    24        CONCAT                                           ~24     'key%3D', !5
         25        CONCAT                                           ~25     ~24, '+val%3D'
         26        INIT_FCALL                                               'var_dump'
         27        SEND_VAR                                                 !4
         28        DO_ICALL                                         $26     
         29        CONCAT                                           ~27     ~25, $26
         30        CONCAT                                           ~28     ~27, '%0A'
         31        ECHO                                                     ~28
   13    32      > JMP                                                      ->22
         33    >   FE_FREE                                                  $21
   15    34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.5 ms | 1396 KiB | 15 Q