3v4l.org

run code in 300+ PHP versions simultaneously
<?php require_once 'readline.php'; $len = readline('Insert lenght of the array' . PHP_EOL); $arr = []; $mid = $len / 2; for ($i = 0; $i < $len; $i++) { $arr[] = readline('Insert number' . PHP_EOL); if ($len % 2 !== 0 && $arr[ceil($mid) + 1] == [ceil($mid) + 1] ) { $ismirror = true; }elseif ($len % 2 == 0 && $arr[$mid] == $arr[$mid +1] && $arr[$mid - 1] == $arr[$mid + 2]){ $ismirror = true; } } echo $ismirror ? 'Yes' : 'No';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 51
Branch analysis from position: 51
2 jumps found. (Code = 44) Position 1 = 53, Position 2 = 10
Branch analysis from position: 53
2 jumps found. (Code = 43) Position 1 = 54, Position 2 = 56
Branch analysis from position: 54
1 jumps found. (Code = 42) Position 1 = 57
Branch analysis from position: 57
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 56
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 46) Position 1 = 18, Position 2 = 30
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 33
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 50
Branch analysis from position: 50
2 jumps found. (Code = 44) Position 1 = 53, Position 2 = 10
Branch analysis from position: 53
Branch analysis from position: 10
Branch analysis from position: 33
2 jumps found. (Code = 46) Position 1 = 36, Position 2 = 41
Branch analysis from position: 36
2 jumps found. (Code = 46) Position 1 = 42, Position 2 = 48
Branch analysis from position: 42
2 jumps found. (Code = 43) Position 1 = 49, Position 2 = 50
Branch analysis from position: 49
2 jumps found. (Code = 44) Position 1 = 53, Position 2 = 10
Branch analysis from position: 53
Branch analysis from position: 10
Branch analysis from position: 50
Branch analysis from position: 48
Branch analysis from position: 41
Branch analysis from position: 30
filename:       /in/e8LPh
function name:  (null)
number of ops:  59
compiled vars:  !0 = $len, !1 = $arr, !2 = $mid, !3 = $i, !4 = $ismirror
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INCLUDE_OR_EVAL                                          'readline.php', REQUIRE_ONCE
    5     1        INIT_FCALL_BY_NAME                                       'readline'
          2        SEND_VAL_EX                                              'Insert+lenght+of+the+array%0A'
          3        DO_FCALL                                      0  $6      
          4        ASSIGN                                                   !0, $6
    6     5        ASSIGN                                                   !1, <array>
    9     6        DIV                                              ~9      !0, 2
          7        ASSIGN                                                   !2, ~9
   10     8        ASSIGN                                                   !3, 0
          9      > JMP                                                      ->51
   11    10    >   INIT_FCALL_BY_NAME                                       'readline'
         11        SEND_VAL_EX                                              'Insert+number%0A'
         12        DO_FCALL                                      0  $13     
         13        ASSIGN_DIM                                               !1
         14        OP_DATA                                                  $13
   12    15        MOD                                              ~14     !0, 2
         16        IS_NOT_IDENTICAL                                 ~15     ~14, 0
         17      > JMPZ_EX                                          ~15     ~15, ->30
         18    >   INIT_FCALL                                               'ceil'
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                         $16     
         21        ADD                                              ~17     $16, 1
         22        FETCH_DIM_R                                      ~18     !1, ~17
         23        INIT_FCALL                                               'ceil'
         24        SEND_VAR                                                 !2
         25        DO_ICALL                                         $19     
         26        ADD                                              ~20     $19, 1
         27        INIT_ARRAY                                       ~21     ~20
         28        IS_EQUAL                                         ~22     ~18, ~21
         29        BOOL                                             ~15     ~22
         30    > > JMPZ                                                     ~15, ->33
   13    31    >   ASSIGN                                                   !4, <true>
         32      > JMP                                                      ->50
   14    33    >   MOD                                              ~24     !0, 2
         34        IS_EQUAL                                         ~25     ~24, 0
         35      > JMPZ_EX                                          ~25     ~25, ->41
         36    >   FETCH_DIM_R                                      ~26     !1, !2
         37        ADD                                              ~27     !2, 1
         38        FETCH_DIM_R                                      ~28     !1, ~27
         39        IS_EQUAL                                         ~29     ~26, ~28
         40        BOOL                                             ~25     ~29
         41    > > JMPZ_EX                                          ~25     ~25, ->48
         42    >   SUB                                              ~30     !2, 1
         43        FETCH_DIM_R                                      ~31     !1, ~30
         44        ADD                                              ~32     !2, 2
         45        FETCH_DIM_R                                      ~33     !1, ~32
         46        IS_EQUAL                                         ~34     ~31, ~33
         47        BOOL                                             ~25     ~34
         48    > > JMPZ                                                     ~25, ->50
   15    49    >   ASSIGN                                                   !4, <true>
   10    50    >   PRE_INC                                                  !3
         51    >   IS_SMALLER                                               !3, !0
         52      > JMPNZ                                                    ~37, ->10
   19    53    > > JMPZ                                                     !4, ->56
         54    >   QM_ASSIGN                                        ~38     'Yes'
         55      > JMP                                                      ->57
         56    >   QM_ASSIGN                                        ~38     'No'
         57    >   ECHO                                                     ~38
         58      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
198.15 ms | 1405 KiB | 15 Q