3v4l.org

run code in 300+ 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):([AP]).*~', '\2\1', 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/L9SNp
function name:  (null)
number of ops:  19
compiled vars:  !0 = $props, !1 = $times
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%7E%28%5Cd%5Cd%3A%5Cd%5Cd%29%3A%28%5BAP%5D%29.%2A%7E'
          3        SEND_VAL                                                 '%5C2%5C1'
          4        INIT_FCALL                                               'array_column'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 'time'
          7        DO_ICALL                                         $3      
          8        SEND_VAR                                                 $3
          9        DO_ICALL                                         $4      
         10        ASSIGN                                                   !1, $4
   11    11        INIT_FCALL                                               'array_multisort'
         12        SEND_REF                                                 !1
         13        SEND_REF                                                 !0
         14        DO_ICALL                                                 
   13    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.99 ms | 1394 KiB | 21 Q