3v4l.org

run code in 500+ PHP versions simultaneously
<?php $arr = array( array ( "L1_ID" => 21, "L1_ATTR_DESC" => "Project Overview", "L2_ATTR_DESC" => "Project Status", "L3_ATTR_DESC" => "Ready" ), array ( "L1_ID" => 21, "L1_ATTR_DESC" => "Project Overview", "L2_ATTR_DESC" => "Project Status", "L3_ATTR_DESC" => "Pending" ), array ( "L1_ID" => 21, "L1_ATTR_DESC" => "Project Overview", "L2_ATTR_DESC" => "Project Status", "L3_ATTR_DESC" => "Completed" ), array ( "L1_ID" => 21, "L1_ATTR_DESC" => "Project Overview", "L2_ATTR_DESC" => "Project Quality", "L3_ATTR_DESC" => "Independ" ), array ( "L1_ID" => 21, "L1_ATTR_DESC" => "Project Overview", "L2_ATTR_DESC" => "Project Quality", "L3_ATTR_DESC" => "G+1" ) ); $ps = array(); foreach($arr as $value){ $index = str_replace(" ", "", strtolower($value['L2_ATTR_DESC'])); $ps[$index][] = $value['L3_ATTR_DESC']; } echo '<pre>'; print_r($ps);
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
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/SaiS9
function name:  (null)
number of ops:  22
compiled vars:  !0 = $arr, !1 = $ps, !2 = $value, !3 = $index
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
   41     1        ASSIGN                                                       !1, <array>
   42     2      > FE_RESET_R                                           $6      !0, ->16
          3    > > FE_FETCH_R                                                   $6, !2, ->16
   43     4    >   INIT_FCALL                                                   'strtolower'
          5        FETCH_DIM_R                                          ~7      !2, 'L2_ATTR_DESC'
          6        SEND_VAL                                                     ~7
          7        DO_ICALL                                             $8      
          8        FRAMELESS_ICALL_3                str_replace         ~9      '+', ''
          9        OP_DATA                                                      $8
         10        ASSIGN                                                       !3, ~9
   44    11        FETCH_DIM_R                                          ~13     !2, 'L3_ATTR_DESC'
         12        FETCH_DIM_W                                          $11     !1, !3
         13        ASSIGN_DIM                                                   $11
         14        OP_DATA                                                      ~13
   42    15      > JMP                                                          ->3
         16    >   FE_FREE                                                      $6
   47    17        ECHO                                                         '%3Cpre%3E'
   48    18        INIT_FCALL                                                   'print_r'
         19        SEND_VAR                                                     !1
         20        DO_ICALL                                                     
         21      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.09 ms | 2299 KiB | 16 Q