3v4l.org

run code in 300+ PHP versions simultaneously
<?php $commands = new \SplStack(); $commands->push(1); $commands->push(2); $commands->setIteratorMode(SplDoublyLinkedList::IT_MODE_LIFO|SplDoublyLinkedList::IT_MODE_DELETE); $commands->rewind(); while ($commands->valid()) { $cmd = $commands->current(); echo "$cmd\n"; $commands->next(); } echo 'count: '.$commands->count();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 15
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 15
Branch analysis from position: 26
Branch analysis from position: 15
filename:       /in/HLrZn
function name:  (null)
number of ops:  31
compiled vars:  !0 = $commands, !1 = $cmd
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $2      'SplStack'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    3     3        INIT_METHOD_CALL                                         !0, 'push'
          4        SEND_VAL_EX                                              1
          5        DO_FCALL                                      0          
    4     6        INIT_METHOD_CALL                                         !0, 'push'
          7        SEND_VAL_EX                                              2
          8        DO_FCALL                                      0          
    5     9        INIT_METHOD_CALL                                         !0, 'setIteratorMode'
         10        SEND_VAL_EX                                              3
         11        DO_FCALL                                      0          
    6    12        INIT_METHOD_CALL                                         !0, 'rewind'
         13        DO_FCALL                                      0          
    7    14      > JMP                                                      ->23
    8    15    >   INIT_METHOD_CALL                                         !0, 'current'
         16        DO_FCALL                                      0  $9      
         17        ASSIGN                                                   !1, $9
    9    18        NOP                                                      
         19        FAST_CONCAT                                      ~11     !1, '%0A'
         20        ECHO                                                     ~11
   10    21        INIT_METHOD_CALL                                         !0, 'next'
         22        DO_FCALL                                      0          
    7    23    >   INIT_METHOD_CALL                                         !0, 'valid'
         24        DO_FCALL                                      0  $13     
         25      > JMPNZ                                                    $13, ->15
   12    26    >   INIT_METHOD_CALL                                         !0, 'count'
         27        DO_FCALL                                      0  $14     
         28        CONCAT                                           ~15     'count%3A+', $14
         29        ECHO                                                     ~15
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.15 ms | 1395 KiB | 13 Q