3v4l.org

run code in 500+ PHP versions simultaneously
<?php $props = [ ['name' => 'Mathematics', 'time' => '03:01:PM - 04:50:PM'], ['name' => 'History', 'time' => '11:30:AM - 01:30:PM'], ['name' => 'French', 'time' => '01:31:PM - 03:00:PM'], ]; $times = preg_replace( '~^(\d\d):(\d\d):(AM|PM) - .*$~', '\3\1\2', array_column($props, 'time') ); array_multisort($times, $props); print_r($props);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uOf06
function name:  (null)
number of ops:  16
compiled vars:  !0 = $props, !1 = $times
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   12     1        INIT_FCALL                                                   'array_column'
          2        SEND_VAR                                                     !0
          3        SEND_VAL                                                     'time'
          4        DO_ICALL                                             $3      
    9     5        FRAMELESS_ICALL_3                preg_replace        ~4      '%7E%5E%28%5Cd%5Cd%29%3A%28%5Cd%5Cd%29%3A%28AM%7CPM%29+-+.%2A%24%7E', '%5C3%5C1%5C2'
   12     6        OP_DATA                                                      $3
    9     7        ASSIGN                                                       !1, ~4
   15     8        INIT_FCALL                                                   'array_multisort'
          9        SEND_REF                                                     !1
         10        SEND_REF                                                     !0
         11        DO_ICALL                                                     
   17    12        INIT_FCALL                                                   'print_r'
         13        SEND_VAR                                                     !0
         14        DO_ICALL                                                     
         15      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.45 ms | 1992 KiB | 16 Q