3v4l.org

run code in 300+ PHP versions simultaneously
<?php $initial_array = Array ( '061716v' => 1, '061610A' => 1, '062433AP' => 1, '063868M' => 2, '059173V' => 3, '061579A' => 3, '062404AP' => 3, '059179V' => 4, '061582A' => 4, '061697V' => 4, '062407AP' => 4 ); $final_array = []; foreach($initial_array as $key=>$val){ $final_array[$val] = isset($final_array[$val]) ? $final_array[$val].','.$key : $key; } print_r($final_array);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 16
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 16
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/lSKE2
function name:  (null)
number of ops:  21
compiled vars:  !0 = $initial_array, !1 = $final_array, !2 = $val, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   16     1        ASSIGN                                                   !1, <array>
   17     2      > FE_RESET_R                                       $6      !0, ->16
          3    > > FE_FETCH_R                                       ~7      $6, !2, ->16
          4    >   ASSIGN                                                   !3, ~7
   18     5        ISSET_ISEMPTY_DIM_OBJ                         0          !1, !2
          6      > JMPZ                                                     ~10, ->12
          7    >   FETCH_DIM_R                                      ~11     !1, !2
          8        CONCAT                                           ~12     ~11, '%2C'
          9        CONCAT                                           ~13     ~12, !3
         10        QM_ASSIGN                                        ~14     ~13
         11      > JMP                                                      ->13
         12    >   QM_ASSIGN                                        ~14     !3
         13    >   ASSIGN_DIM                                               !1, !2
         14        OP_DATA                                                  ~14
   17    15      > JMP                                                      ->3
         16    >   FE_FREE                                                  $6
   20    17        INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
274.23 ms | 1010 KiB | 14 Q