3v4l.org

run code in 300+ 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 = 19
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 19
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/SaiS9
function name:  (null)
number of ops:  25
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, ->19
          3    > > FE_FETCH_R                                               $6, !2, ->19
   43     4    >   INIT_FCALL                                               'str_replace'
          5        SEND_VAL                                                 '+'
          6        SEND_VAL                                                 ''
          7        INIT_FCALL                                               'strtolower'
          8        FETCH_DIM_R                                      ~7      !2, 'L2_ATTR_DESC'
          9        SEND_VAL                                                 ~7
         10        DO_ICALL                                         $8      
         11        SEND_VAR                                                 $8
         12        DO_ICALL                                         $9      
         13        ASSIGN                                                   !3, $9
   44    14        FETCH_DIM_R                                      ~13     !2, 'L3_ATTR_DESC'
         15        FETCH_DIM_W                                      $11     !1, !3
         16        ASSIGN_DIM                                               $11
         17        OP_DATA                                                  ~13
   42    18      > JMP                                                      ->3
         19    >   FE_FREE                                                  $6
   47    20        ECHO                                                     '%3Cpre%3E'
   48    21        INIT_FCALL                                               'print_r'
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.89 ms | 1410 KiB | 19 Q