3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ ['name' => 'Mathmatics', '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'], ]; usort($arr,function($a,$b){ $dta = DateTime::createFromFormat('h:i:A',substr($a['time'],0,8)); $dtb = DateTime::createFromFormat('h:i:A',substr($b['time'],0,8)); return $dta <=> $dtb; }); print_r($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Fq9U5
function name:  (null)
number of ops:  10
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        INIT_FCALL                                               'usort'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FFq9U5%3A9%240'
   13     4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
   15     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FFq9U5%3A9%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Fq9U5
function name:  {closure}
number of ops:  27
compiled vars:  !0 = $a, !1 = $b, !2 = $dta, !3 = $dtb
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   10     2        INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
          3        SEND_VAL                                                 'h%3Ai%3AA'
          4        INIT_FCALL                                               'substr'
          5        FETCH_DIM_R                                      ~4      !0, 'time'
          6        SEND_VAL                                                 ~4
          7        SEND_VAL                                                 0
          8        SEND_VAL                                                 8
          9        DO_ICALL                                         $5      
         10        SEND_VAR                                                 $5
         11        DO_FCALL                                      0  $6      
         12        ASSIGN                                                   !2, $6
   11    13        INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
         14        SEND_VAL                                                 'h%3Ai%3AA'
         15        INIT_FCALL                                               'substr'
         16        FETCH_DIM_R                                      ~8      !1, 'time'
         17        SEND_VAL                                                 ~8
         18        SEND_VAL                                                 0
         19        SEND_VAL                                                 8
         20        DO_ICALL                                         $9      
         21        SEND_VAR                                                 $9
         22        DO_FCALL                                      0  $10     
         23        ASSIGN                                                   !3, $10
   12    24        SPACESHIP                                        ~12     !2, !3
         25      > RETURN                                                   ~12
   13    26*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FFq9U5%3A9%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.62 ms | 1396 KiB | 19 Q