3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array=[ '2 16 10 4 0 0 0 0 0', '0 0 0 4', '2 15 8 6 0 0 0 0 0', '0 0 0 3', '3 18 12 5 0 0 0 0 0', '0 0 0 2' ]; $pairs=array_chunk(preg_replace('/\s+/',' ',$array),2); foreach($pairs as $pair){ $result[]="{$pair[0]} {$pair[1]}"; } var_export($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 18
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 18
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/GEPbJ
function name:  (null)
number of ops:  23
compiled vars:  !0 = $array, !1 = $pairs, !2 = $pair, !3 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
   11     1        INIT_FCALL                                                   'array_chunk'
          2        FRAMELESS_ICALL_3                preg_replace        ~5      '%2F%5Cs%2B%2F', '+'
          3        OP_DATA                                                      !0
          4        SEND_VAL                                                     ~5
          5        SEND_VAL                                                     2
          6        DO_ICALL                                             $6      
          7        ASSIGN                                                       !1, $6
   12     8      > FE_RESET_R                                           $8      !1, ->18
          9    > > FE_FETCH_R                                                   $8, !2, ->18
   13    10    >   FETCH_DIM_R                                          ~10     !2, 0
         11        ROPE_INIT                                         3  ~13     ~10
         12        ROPE_ADD                                          1  ~13     ~13, '+'
         13        FETCH_DIM_R                                          ~11     !2, 1
         14        ROPE_END                                          2  ~12     ~13, ~11
         15        ASSIGN_DIM                                                   !3
         16        OP_DATA                                                      ~12
   12    17      > JMP                                                          ->9
         18    >   FE_FREE                                                      $8
   16    19        INIT_FCALL                                                   'var_export'
         20        SEND_VAR                                                     !3
         21        DO_ICALL                                                     
         22      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
169.16 ms | 2070 KiB | 15 Q