3v4l.org

run code in 300+ PHP versions simultaneously
<?php $q = new SplDoublyLinkedList; $q->push('A'); $q->push('B'); $q->push('C'); $q->push('D'); $q->push('E'); $prev = null; $q->rewind(); while ($q->valid()) { $current = $q->current(); echo 'PREV: ', $prev, PHP_EOL; echo 'CURRENT: ', $current, PHP_EOL; $prev = $current; $q->next(); $next = $q->current(); echo 'NEXT: ', $next, PHP_EOL; echo PHP_EOL; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 22
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 22
Branch analysis from position: 44
Branch analysis from position: 22
filename:       /in/2deOX
function name:  (null)
number of ops:  45
compiled vars:  !0 = $q, !1 = $prev, !2 = $current, !3 = $next
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'SplDoublyLinkedList'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    4     3        INIT_METHOD_CALL                                         !0, 'push'
          4        SEND_VAL_EX                                              'A'
          5        DO_FCALL                                      0          
    5     6        INIT_METHOD_CALL                                         !0, 'push'
          7        SEND_VAL_EX                                              'B'
          8        DO_FCALL                                      0          
    6     9        INIT_METHOD_CALL                                         !0, 'push'
         10        SEND_VAL_EX                                              'C'
         11        DO_FCALL                                      0          
    7    12        INIT_METHOD_CALL                                         !0, 'push'
         13        SEND_VAL_EX                                              'D'
         14        DO_FCALL                                      0          
    8    15        INIT_METHOD_CALL                                         !0, 'push'
         16        SEND_VAL_EX                                              'E'
         17        DO_FCALL                                      0          
   10    18        ASSIGN                                                   !1, null
   11    19        INIT_METHOD_CALL                                         !0, 'rewind'
         20        DO_FCALL                                      0          
   12    21      > JMP                                                      ->41
   13    22    >   INIT_METHOD_CALL                                         !0, 'current'
         23        DO_FCALL                                      0  $14     
         24        ASSIGN                                                   !2, $14
   14    25        ECHO                                                     'PREV%3A+'
         26        ECHO                                                     !1
         27        ECHO                                                     '%0A'
   15    28        ECHO                                                     'CURRENT%3A+'
         29        ECHO                                                     !2
         30        ECHO                                                     '%0A'
   16    31        ASSIGN                                                   !1, !2
   17    32        INIT_METHOD_CALL                                         !0, 'next'
         33        DO_FCALL                                      0          
   18    34        INIT_METHOD_CALL                                         !0, 'current'
         35        DO_FCALL                                      0  $18     
         36        ASSIGN                                                   !3, $18
   19    37        ECHO                                                     'NEXT%3A+'
         38        ECHO                                                     !3
         39        ECHO                                                     '%0A'
   20    40        ECHO                                                     '%0A'
   12    41    >   INIT_METHOD_CALL                                         !0, 'valid'
         42        DO_FCALL                                      0  $20     
         43      > JMPNZ                                                    $20, ->22
   21    44    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.4 ms | 1399 KiB | 13 Q