3v4l.org

run code in 500+ 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 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 7
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 7
Branch analysis from position: 17
Branch analysis from position: 7
filename:       /in/M3uZN
function name:  (null)
number of ops:  21
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                                                          ->15
   12     7    >   INIT_FCALL                                                   'array_column'
          8        SEND_VAR                                                     !0
          9        SEND_VAR                                                     !3
         10        DO_ICALL                                             $11     
         11        FRAMELESS_ICALL_2                implode             ~12     '%2C', $11
         12        ASSIGN_DIM                                                   !1
         13        OP_DATA                                                      ~12
   11    14        PRE_INC                                                      !3
         15    >   IS_SMALLER                                                   !3, !2
         16      > JMPNZ                                                        ~14, ->7
   15    17    >   INIT_FCALL                                                   'print_r'
         18        SEND_VAR                                                     !1
         19        DO_ICALL                                                     
         20      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
171.29 ms | 2612 KiB | 17 Q