3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pages = array( 'a' => '/pages/first', 'b' => '/pages/another', 'c' => '/pages/third', 'd' => '/pages/something-else' ); $current = 'a'; reset($pages); do { $a = key($pages); next($pages); $b = key($pages); next($pages); $c = key($pages); break; } while(true); var_dump($a,$b,$c);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TLlZ1
function name:  (null)
number of ops:  31
compiled vars:  !0 = $pages, !1 = $current, !2 = $a, !3 = $b, !4 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        ASSIGN                                                   !1, 'a'
   11     2        INIT_FCALL                                               'reset'
          3        SEND_REF                                                 !0
          4        DO_ICALL                                                 
   13     5        INIT_FCALL                                               'key'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $8      
          8        ASSIGN                                                   !2, $8
          9        INIT_FCALL                                               'next'
         10        SEND_REF                                                 !0
         11        DO_ICALL                                                 
   14    12        INIT_FCALL                                               'key'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $11     
         15        ASSIGN                                                   !3, $11
         16        INIT_FCALL                                               'next'
         17        SEND_REF                                                 !0
         18        DO_ICALL                                                 
   15    19        INIT_FCALL                                               'key'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $14     
         22        ASSIGN                                                   !4, $14
   16    23      > JMP                                                      ->25
   17    24*       JMPNZ                                                    <true>, ->5
   19    25    >   INIT_FCALL                                               'var_dump'
         26        SEND_VAR                                                 !2
         27        SEND_VAR                                                 !3
         28        SEND_VAR                                                 !4
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.32 ms | 1429 KiB | 17 Q