3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ '00:00:00' => [ 'name' => 'Arr Name 1', 'other-details' => 'Arr Desscription 1', 'type' => 'Arr Type 1' ], '00:00:30' => [ 'name' => 'Arr Name 2', 'other-details' => 'Arr Desscription 2', 'type' => 'Arr Type 2' ], '00:01:00' => [ 'name' => 'Arr Name 3', 'other-details' => 'Arr Desscription 3', 'type' => 'Arr Type 3' ], '00:01:30' => [ 'name' => 'Arr Name 4', 'other-details' => 'Arr Desscription 4', 'type' => 'Arr Type 4' ] ]; $keys = array_keys($a); for ($i = 0; $i < count($keys); $i++) { $result = $keys[$i]; if (array_key_exists($i+1, $keys)) { $result .= " " . $keys[$i + 1]; } echo $result . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 7
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 7
Branch analysis from position: 22
Branch analysis from position: 7
Branch analysis from position: 16
filename:       /in/s4u87
function name:  (null)
number of ops:  23
compiled vars:  !0 = $a, !1 = $keys, !2 = $i, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   26     1        INIT_FCALL                                               'array_keys'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
   27     5        ASSIGN                                                   !2, 0
          6      > JMP                                                      ->19
   28     7    >   FETCH_DIM_R                                      ~8      !1, !2
          8        ASSIGN                                                   !3, ~8
   29     9        ADD                                              ~10     !2, 1
         10        ARRAY_KEY_EXISTS                                         ~10, !1
         11      > JMPZ                                                     ~11, ->16
   30    12    >   ADD                                              ~12     !2, 1
         13        FETCH_DIM_R                                      ~13     !1, ~12
         14        CONCAT                                           ~14     '+', ~13
         15        ASSIGN_OP                                     8          !3, ~14
   32    16    >   CONCAT                                           ~16     !3, '%0A'
         17        ECHO                                                     ~16
   27    18        PRE_INC                                                  !2
         19    >   COUNT                                            ~18     !1
         20        IS_SMALLER                                               !2, ~18
         21      > JMPNZ                                                    ~19, ->7
   33    22    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.95 ms | 1010 KiB | 14 Q