3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.6 ms | 1396 KiB | 17 Q