3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array('leg1'=>'LA', 'leg2'=>'NY', 'leg3'=>'NY', 'leg4'=>'NY', 'leg5'=>'FL'); while($current = current($a)) { echo $current . "... "; if(next($a) == $current && next($a) == $current){ echo "matches the next two values!\n"; } else { echo "does NOT match the next two values\n"; } prev($a); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 2
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 46) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 2
Branch analysis from position: 26
Branch analysis from position: 2
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 2
Branch analysis from position: 26
Branch analysis from position: 2
Branch analysis from position: 14
filename:       /in/AeYUH
function name:  (null)
number of ops:  27
compiled vars:  !0 = $a, !1 = $current
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1      > JMP                                                      ->21
    5     2    >   CONCAT                                           ~3      !1, '...+'
          3        ECHO                                                     ~3
    6     4        INIT_FCALL                                               'next'
          5        SEND_REF                                                 !0
          6        DO_ICALL                                         $4      
          7        IS_EQUAL                                         ~5      !1, $4
          8      > JMPZ_EX                                          ~5      ~5, ->14
          9    >   INIT_FCALL                                               'next'
         10        SEND_REF                                                 !0
         11        DO_ICALL                                         $6      
         12        IS_EQUAL                                         ~7      !1, $6
         13        BOOL                                             ~5      ~7
         14    > > JMPZ                                                     ~5, ->17
    7    15    >   ECHO                                                     'matches+the+next+two+values%21%0A'
         16      > JMP                                                      ->18
    9    17    >   ECHO                                                     'does+NOT+match+the+next+two+values%0A'
   12    18    >   INIT_FCALL                                               'prev'
         19        SEND_REF                                                 !0
         20        DO_ICALL                                                 
    4    21    >   INIT_FCALL                                               'current'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                         $9      
         24        ASSIGN                                           ~10     !1, $9
         25      > JMPNZ                                                    ~10, ->2
   13    26    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.27 ms | 1401 KiB | 19 Q