3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xs = new SplDoublyLinkedList(); $xs->push(1); $xs->push(2); $xs->push(3); foreach ($xs as $x) { echo "$x\n"; } foreach ($xs as $i => $x) { echo "$i => $x\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 18
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 18
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 28
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 28
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
Branch analysis from position: 18
filename:       /in/RmZA3
function name:  (null)
number of ops:  30
compiled vars:  !0 = $xs, !1 = $x, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'SplDoublyLinkedList'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    4     3        INIT_METHOD_CALL                                         !0, 'push'
          4        SEND_VAL_EX                                              1
          5        DO_FCALL                                      0          
    5     6        INIT_METHOD_CALL                                         !0, 'push'
          7        SEND_VAL_EX                                              2
          8        DO_FCALL                                      0          
    6     9        INIT_METHOD_CALL                                         !0, 'push'
         10        SEND_VAL_EX                                              3
         11        DO_FCALL                                      0          
    8    12      > FE_RESET_R                                       $9      !0, ->18
         13    > > FE_FETCH_R                                               $9, !1, ->18
    9    14    >   NOP                                                      
         15        FAST_CONCAT                                      ~10     !1, '%0A'
         16        ECHO                                                     ~10
    8    17      > JMP                                                      ->13
         18    >   FE_FREE                                                  $9
   12    19      > FE_RESET_R                                       $11     !0, ->28
         20    > > FE_FETCH_R                                       ~12     $11, !1, ->28
         21    >   ASSIGN                                                   !2, ~12
   13    22        ROPE_INIT                                     4  ~15     !2
         23        ROPE_ADD                                      1  ~15     ~15, '+%3D%3E+'
         24        ROPE_ADD                                      2  ~15     ~15, !1
         25        ROPE_END                                      3  ~14     ~15, '%0A'
         26        ECHO                                                     ~14
   12    27      > JMP                                                      ->20
         28    >   FE_FREE                                                  $11
   14    29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.23 ms | 998 KiB | 13 Q