3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array('leg1'=>'LA', 'leg2'=>'NY', 'leg3'=>'NY', 'leg4'=>'FL'); while($current = next($a)) { echo "current: " . key($a) . ":" . $current; $next = next($a); echo "next: " . key($a) . ":" . $next; $nextnext = next($a); echo "nextnext: " . key($a) . ":" . $nextnext; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 36, Position 2 = 2
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 36, Position 2 = 2
Branch analysis from position: 36
Branch analysis from position: 2
filename:       /in/rBeGp
function name:  (null)
number of ops:  37
compiled vars:  !0 = $a, !1 = $current, !2 = $next, !3 = $nextnext
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1      > JMP                                                      ->31
    5     2    >   INIT_FCALL                                               'key'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5        CONCAT                                           ~6      'current%3A+', $5
          6        CONCAT                                           ~7      ~6, '%3A'
          7        CONCAT                                           ~8      ~7, !1
          8        ECHO                                                     ~8
    7     9        INIT_FCALL                                               'next'
         10        SEND_REF                                                 !0
         11        DO_ICALL                                         $9      
         12        ASSIGN                                                   !2, $9
    8    13        INIT_FCALL                                               'key'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $11     
         16        CONCAT                                           ~12     'next%3A+', $11
         17        CONCAT                                           ~13     ~12, '%3A'
         18        CONCAT                                           ~14     ~13, !2
         19        ECHO                                                     ~14
   10    20        INIT_FCALL                                               'next'
         21        SEND_REF                                                 !0
         22        DO_ICALL                                         $15     
         23        ASSIGN                                                   !3, $15
   11    24        INIT_FCALL                                               'key'
         25        SEND_VAR                                                 !0
         26        DO_ICALL                                         $17     
         27        CONCAT                                           ~18     'nextnext%3A+', $17
         28        CONCAT                                           ~19     ~18, '%3A'
         29        CONCAT                                           ~20     ~19, !3
         30        ECHO                                                     ~20
    4    31    >   INIT_FCALL                                               'next'
         32        SEND_REF                                                 !0
         33        DO_ICALL                                         $21     
         34        ASSIGN                                           ~22     !1, $21
         35      > JMPNZ                                                    ~22, ->2
   12    36    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.08 ms | 1396 KiB | 17 Q