3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( array('N', 'N', 'Y', 'Y', 'Y', 'Y'), array('N', 'N', 'Y', 'Y', 'N', 'Y'), array('N', 'N', 'Y', 'Y', 'N', 'Y'), array('Y', 'Y', 'Y', 'Y', 'Y', 'Y'), ); $new = array(); $count = count($arr[0]); for ($i = 0; $i < $count; $i++) { $new[] = implode(',', array_column($arr, $i)); } print_r($new);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 7
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 7
Branch analysis from position: 20
Branch analysis from position: 7
filename:       /in/M3uZN
function name:  (null)
number of ops:  24
compiled vars:  !0 = $arr, !1 = $new, !2 = $count, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, <array>
   10     2        FETCH_DIM_R                                      ~6      !0, 0
          3        COUNT                                            ~7      ~6
          4        ASSIGN                                                   !2, ~7
   11     5        ASSIGN                                                   !3, 0
          6      > JMP                                                      ->18
   12     7    >   INIT_FCALL                                               'implode'
          8        SEND_VAL                                                 '%2C'
          9        INIT_FCALL                                               'array_column'
         10        SEND_VAR                                                 !0
         11        SEND_VAR                                                 !3
         12        DO_ICALL                                         $11     
         13        SEND_VAR                                                 $11
         14        DO_ICALL                                         $12     
         15        ASSIGN_DIM                                               !1
         16        OP_DATA                                                  $12
   11    17        PRE_INC                                                  !3
         18    >   IS_SMALLER                                               !3, !2
         19      > JMPNZ                                                    ~14, ->7
   15    20    >   INIT_FCALL                                               'print_r'
         21        SEND_VAR                                                 !1
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.08 ms | 1004 KiB | 16 Q