3v4l.org

run code in 500+ PHP versions simultaneously
<?php $test = array( 30.04, 0.00, 30.04, 0.00, 47.00, 17.03, 5.02, 25.08, 2.06, 32.06, 37.00, 7.07, ); $output = array(); foreach ($test as $key => $value) { // To make sure this will only be executed every second item if ($key % 2 !== 0) { continue; } $next = ''; if (!isset($test[$key+1])) { break; } else { $next = $test[$key+1]; } $output[$key] = $value . ' is ' . ($value < $next ? "lower" : ($value > $next ? 'higher' : 'equal')) . ' than ' . $next; } echo '<pre>'; print_r($output);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 36
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 36
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 28
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 36
Branch analysis from position: 36
filename:       /in/Pg5La
function name:  (null)
number of ops:  42
compiled vars:  !0 = $test, !1 = $output, !2 = $value, !3 = $key, !4 = $next
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   18     1        ASSIGN                                                       !1, <array>
   19     2      > FE_RESET_R                                           $7      !0, ->36
          3    > > FE_FETCH_R                                           ~8      $7, !2, ->36
          4    >   ASSIGN                                                       !3, ~8
   21     5        MOD                                                  ~10     !3, 2
          6        IS_NOT_IDENTICAL                                             ~10, 0
          7      > JMPZ                                                         ~11, ->9
   22     8    > > JMP                                                          ->3
   24     9    >   ASSIGN                                                       !4, ''
   25    10        ADD                                                  ~13     !3, 1
         11        ISSET_ISEMPTY_DIM_OBJ                             0  ~14     !0, ~13
         12        BOOL_NOT                                             ~15     ~14
         13      > JMPZ                                                         ~15, ->16
   26    14    > > JMP                                                          ->36
   25    15*       JMP                                                          ->19
   28    16    >   ADD                                                  ~16     !3, 1
         17        FETCH_DIM_R                                          ~17     !0, ~16
         18        ASSIGN                                                       !4, ~17
   31    19        CONCAT                                               ~20     !2, '+is+'
         20        IS_SMALLER                                                   !2, !4
         21      > JMPZ                                                         ~21, ->24
   32    22    >   QM_ASSIGN                                            ~22     'lower'
         23      > JMP                                                          ->30
   33    24    >   IS_SMALLER                                                   !4, !2
         25      > JMPZ                                                         ~23, ->28
   34    26    >   QM_ASSIGN                                            ~24     'higher'
         27      > JMP                                                          ->29
   35    28    >   QM_ASSIGN                                            ~24     'equal'
         29    >   QM_ASSIGN                                            ~22     ~24
         30    >   CONCAT                                               ~25     ~20, ~22
         31        CONCAT                                               ~26     ~25, '+than+'
         32        CONCAT                                               ~27     ~26, !4
   31    33        ASSIGN_DIM                                                   !1, !3
   35    34        OP_DATA                                                      ~27
   19    35      > JMP                                                          ->3
         36    >   FE_FREE                                                      $7
   38    37        ECHO                                                         '%3Cpre%3E'
   39    38        INIT_FCALL                                                   'print_r'
         39        SEND_VAR                                                     !1
         40        DO_ICALL                                                     
         41      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.7 ms | 2602 KiB | 14 Q