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' ]; $prepped_copy=preg_replace('/\s+/',' ',$array); while($prepped_copy){ $result[]=implode(' ',array_splice($prepped_copy,0,2)); } var_export($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 5
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 5
Branch analysis from position: 14
Branch analysis from position: 5
filename:       /in/eWIR0
function name:  (null)
number of ops:  18
compiled vars:  !0 = $array, !1 = $prepped_copy, !2 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
   11     1        FRAMELESS_ICALL_3                preg_replace        ~4      '%2F%5Cs%2B%2F', '+'
          2        OP_DATA                                                      !0
          3        ASSIGN                                                       !1, ~4
   12     4      > JMP                                                          ->13
   13     5    >   INIT_FCALL                                                   'array_splice'
          6        SEND_REF                                                     !1
          7        SEND_VAL                                                     0
          8        SEND_VAL                                                     2
          9        DO_ICALL                                             $7      
         10        FRAMELESS_ICALL_2                implode             ~8      '+', $7
         11        ASSIGN_DIM                                                   !2
         12        OP_DATA                                                      ~8
   12    13    > > JMPNZ                                                        !1, ->5
   16    14    >   INIT_FCALL                                                   'var_export'
         15        SEND_VAR                                                     !2
         16        DO_ICALL                                                     
         17      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
173.71 ms | 2253 KiB | 15 Q