3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = json_decode('[ {"idx": "1","mom_member_idx": "1","teacher_member_idx": "2","care_start_datetime": "2019-09-09 08:30:00"}, {"idx": "2","mom_member_idx": "1","teacher_member_idx": "2","care_start_datetime": "2019-09-10 08:30:00"}, {"idx": "3","mom_member_idx": "2","teacher_member_idx": "2","care_start_datetime": "2019-09-09 08:30:00"} ]', true); usort($data, function($a, $b) { return strtotime($a['care_start_datetime']) > strtotime($b['care_start_datetime']) ? -1 : 1; }); unset($data[0]); print_r($data);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RSRRa
function name:  (null)
number of ops:  15
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'json_decode'
          1        SEND_VAL                                                 '%5B%0A++++%7B%22idx%22%3A+%221%22%2C%22mom_member_idx%22%3A+%221%22%2C%22teacher_member_idx%22%3A+%222%22%2C%22care_start_datetime%22%3A+%222019-09-09+08%3A30%3A00%22%7D%2C%0A++++%7B%22idx%22%3A+%222%22%2C%22mom_member_idx%22%3A+%221%22%2C%22teacher_member_idx%22%3A+%222%22%2C%22care_start_datetime%22%3A+%222019-09-10+08%3A30%3A00%22%7D%2C%0A++++%7B%22idx%22%3A+%223%22%2C%22mom_member_idx%22%3A+%222%22%2C%22teacher_member_idx%22%3A+%222%22%2C%22care_start_datetime%22%3A+%222019-09-09+08%3A30%3A00%22%7D%0A%5D'
    7     2        SEND_VAL                                                 <true>
    3     3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
    9     5        INIT_FCALL                                               'usort'
          6        SEND_REF                                                 !0
          7        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
          8        SEND_VAL                                                 ~3
          9        DO_ICALL                                                 
   10    10        UNSET_DIM                                                !0, 0
   12    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
         14      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RSRRa
function name:  {closure}
number of ops:  17
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        INIT_FCALL                                               'strtotime'
          3        FETCH_DIM_R                                      ~2      !0, 'care_start_datetime'
          4        SEND_VAL                                                 ~2
          5        DO_ICALL                                         $3      
          6        INIT_FCALL                                               'strtotime'
          7        FETCH_DIM_R                                      ~4      !1, 'care_start_datetime'
          8        SEND_VAL                                                 ~4
          9        DO_ICALL                                         $5      
         10        IS_SMALLER                                               $5, $3
         11      > JMPZ                                                     ~6, ->14
         12    >   QM_ASSIGN                                        ~7      -1
         13      > JMP                                                      ->15
         14    >   QM_ASSIGN                                        ~7      1
         15    > > RETURN                                                   ~7
         16*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.61 ms | 1018 KiB | 17 Q