3v4l.org

run code in 500+ PHP versions simultaneously
<?php $data = array(54,12,61,98,88, 92,45,22,13,36); $halfway = count($data)/ 2; for ($i = 0; $i < $halfway; $i++) { $j = $i + $halfway; echo $data[$j] - $data[$i].PHP_EOL; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 6
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 6
Branch analysis from position: 16
Branch analysis from position: 6
filename:       /in/ictDT
function name:  (null)
number of ops:  17
compiled vars:  !0 = $data, !1 = $halfway, !2 = $i, !3 = $j
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    6     1        COUNT                                                ~5      !0
          2        DIV                                                  ~6      ~5, 2
          3        ASSIGN                                                       !1, ~6
    8     4        ASSIGN                                                       !2, 0
          5      > JMP                                                          ->14
   10     6    >   ADD                                                  ~9      !2, !1
          7        ASSIGN                                                       !3, ~9
   11     8        FETCH_DIM_R                                          ~11     !0, !3
          9        FETCH_DIM_R                                          ~12     !0, !2
         10        SUB                                                  ~13     ~11, ~12
         11        CONCAT                                               ~14     ~13, '%0A'
         12        ECHO                                                         ~14
    8    13        PRE_INC                                                      !2
         14    >   IS_SMALLER                                                   !2, !1
         15      > JMPNZ                                                        ~16, ->6
   12    16    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
187.51 ms | 1877 KiB | 13 Q