3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [1, 2, 3, 4, 3, 2, 1]; $j = count($a) - 1; echo $j; $output = []; for($i = 0; $i > count($a); $i++) { echo $a[$i] ." ". $a[$j]; if ($a[$i] !== $a[$j]) { $output = $a[$i]; } $j--; } print_r($output);
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 = 24, Position 2 = 8
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 8
Branch analysis from position: 24
Branch analysis from position: 8
Branch analysis from position: 19
filename:       /in/eUEqF
function name:  (null)
number of ops:  28
compiled vars:  !0 = $a, !1 = $j, !2 = $output, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        COUNT                                            ~5      !0
          2        SUB                                              ~6      ~5, 1
          3        ASSIGN                                                   !1, ~6
    7     4        ECHO                                                     !1
    9     5        ASSIGN                                                   !2, <array>
   11     6        ASSIGN                                                   !3, 0
          7      > JMP                                                      ->21
   12     8    >   FETCH_DIM_R                                      ~10     !0, !3
          9        CONCAT                                           ~11     ~10, '++'
         10        FETCH_DIM_R                                      ~12     !0, !1
         11        CONCAT                                           ~13     ~11, ~12
         12        ECHO                                                     ~13
   13    13        FETCH_DIM_R                                      ~14     !0, !3
         14        FETCH_DIM_R                                      ~15     !0, !1
         15        IS_NOT_IDENTICAL                                         ~14, ~15
         16      > JMPZ                                                     ~16, ->19
   14    17    >   FETCH_DIM_R                                      ~17     !0, !3
         18        ASSIGN                                                   !2, ~17
   17    19    >   PRE_DEC                                                  !1
   11    20        PRE_INC                                                  !3
         21    >   COUNT                                            ~21     !0
         22        IS_SMALLER                                               ~21, !3
         23      > JMPNZ                                                    ~22, ->8
   20    24    >   INIT_FCALL                                               'print_r'
         25        SEND_VAR                                                 !2
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.44 ms | 1396 KiB | 15 Q