3v4l.org

run code in 300+ PHP versions simultaneously
<?php $original_values = array( 'Bridge Work' => array( array('Name' => 'NJ Trunpike_Bridge Repair Work', 'Location' => 'New Jersey', 'State' => 'New Jersey'), array('Name' => 'Honoapiilani Highway Bridge Truss', 'Location' => 'Maui', 'State' => 'Hawaii'), array('Name' => 'BlueCross Blueshield of Tennessee (Bridge)', 'Location' => 'Memphis', 'State' => 'Tennessee'), array('Name' => 'Henderson Center Connector Bridge', 'Location' => 'Coquitlam', 'State' => 'British Columbia'), ), 'Educational' => array( array('Name' => 'RTI TASS Complex Admin Bldg', 'Location' => 'Bluffdale', 'State' => 'Utah'), array('Name' => 'Auburn High School', 'Location' => 'Auburn', 'State' => 'Washington'), array('Name' => 'Reed College', 'Location' => 'Portland', 'State' => 'Oregon'), array('Name' => 'Shorewood High School', 'Location' => 'Shoreline', 'State' => 'Washington'), ),); $sorted_values = array(); foreach($original_values as $key => $value) { $columns = null; foreach ($value as $index => $element) { $columns[] = $element['State']; } $temp = $value; array_multisort($columns, SORT_ASC, $temp); $sorted_values[$key] = $temp; } echo '<pre>'; print_r($sorted_values); echo '</pre>';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 23
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 23
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 13
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/GkdfZ
function name:  (null)
number of ops:  30
compiled vars:  !0 = $original_values, !1 = $sorted_values, !2 = $value, !3 = $key, !4 = $columns, !5 = $element, !6 = $index, !7 = $temp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, <array>
    6     2      > FE_RESET_R                                       $10     !0, ->23
          3    > > FE_FETCH_R                                       ~11     $10, !2, ->23
          4    >   ASSIGN                                                   !3, ~11
    7     5        ASSIGN                                                   !4, null
    8     6      > FE_RESET_R                                       $14     !2, ->13
          7    > > FE_FETCH_R                                       ~15     $14, !5, ->13
          8    >   ASSIGN                                                   !6, ~15
    9     9        FETCH_DIM_R                                      ~18     !5, 'State'
         10        ASSIGN_DIM                                               !4
         11        OP_DATA                                                  ~18
    8    12      > JMP                                                      ->7
         13    >   FE_FREE                                                  $14
   11    14        ASSIGN                                                   !7, !2
   12    15        INIT_FCALL                                               'array_multisort'
         16        SEND_REF                                                 !4
         17        SEND_VAL                                                 4
         18        SEND_REF                                                 !7
         19        DO_ICALL                                                 
   13    20        ASSIGN_DIM                                               !1, !3
         21        OP_DATA                                                  !7
    6    22      > JMP                                                      ->3
         23    >   FE_FREE                                                  $10
   16    24        ECHO                                                     '%3Cpre%3E'
   17    25        INIT_FCALL                                               'print_r'
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                                 
   18    28        ECHO                                                     '%3C%2Fpre%3E'
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.1 ms | 1396 KiB | 17 Q