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 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 2
Branch analysis from position: 23
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
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 2
Branch analysis from position: 23
Branch analysis from position: 2
Branch analysis from position: 14
filename:       /in/1IpYQ
function name:  (null)
number of ops:  24
compiled vars:  !0 = $a, !1 = $current
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1      > JMP                                                      ->18
    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'
    4    18    >   INIT_FCALL                                               'current'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                         $8      
         21        ASSIGN                                           ~9      !1, $8
         22      > JMPNZ                                                    ~9, ->2
   13    23    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.17 ms | 1396 KiB | 17 Q