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 . "... "; $next = next($a); $nextnext = next($a); if($next == $current && $nextnext == $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 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 2
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 46) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 2
Branch analysis from position: 28
Branch analysis from position: 2
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 2
Branch analysis from position: 28
Branch analysis from position: 2
Branch analysis from position: 16
filename:       /in/7Of20
function name:  (null)
number of ops:  29
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                                                      ->23
    5     2    >   CONCAT                                           ~5      !1, '...+'
          3        ECHO                                                     ~5
    7     4        INIT_FCALL                                               'next'
          5        SEND_REF                                                 !0
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !2, $6
    8     8        INIT_FCALL                                               'next'
          9        SEND_REF                                                 !0
         10        DO_ICALL                                         $8      
         11        ASSIGN                                                   !3, $8
   10    12        IS_EQUAL                                         ~10     !2, !1
         13      > JMPZ_EX                                          ~10     ~10, ->16
         14    >   IS_EQUAL                                         ~11     !3, !1
         15        BOOL                                             ~10     ~11
         16    > > JMPZ                                                     ~10, ->19
   11    17    >   ECHO                                                     'matches+the+next+two+values%21%0A'
         18      > JMP                                                      ->20
   13    19    >   ECHO                                                     'does+NOT+match+the+next+two+values%0A'
   16    20    >   INIT_FCALL                                               'prev'
         21        SEND_REF                                                 !0
         22        DO_ICALL                                                 
    4    23    >   INIT_FCALL                                               'current'
         24        SEND_VAR                                                 !0
         25        DO_ICALL                                         $13     
         26        IS_EQUAL                                                 !1, $13
         27      > JMPNZ                                                    ~14, ->2
   17    28    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.5 ms | 1396 KiB | 19 Q