3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array( array( 'label' => 'AA', 'start' => '2015-09-05 14:14:14' ), array( 'label' => 'DD', 'start' => '2015-09-14 14:14:14' ), array( 'label' => 'EE', 'start' => '2016-09-05 14:14:14' ), array( 'label' => 'BB', 'start' => '2015-09-08 00:00:00' ), array( 'label' => 'CC', 'start' => '2015-09-08 01:14:14' ), ); usort($a, function($a, $b) { $a = strtotime($a); $b = strtotime($b); if ($a == $b) { return 0; } return ($a < $b) ? -1 : 1; }); var_dump($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AqZGY
function name:  (null)
number of ops:  10
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   25     1        INIT_FCALL                                               'usort'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FAqZGY%3A25%240'
   33     4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
   34     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FAqZGY%3A25%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AqZGY
function name:  {closure}
number of ops:  20
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   26     2        INIT_FCALL                                               'strtotime'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5        ASSIGN                                                   !0, $2
   27     6        INIT_FCALL                                               'strtotime'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $4      
          9        ASSIGN                                                   !1, $4
   29    10        IS_EQUAL                                                 !0, !1
         11      > JMPZ                                                     ~6, ->13
   30    12    > > RETURN                                                   0
   32    13    >   IS_SMALLER                                               !0, !1
         14      > JMPZ                                                     ~7, ->17
         15    >   QM_ASSIGN                                        ~8      -1
         16      > JMP                                                      ->18
         17    >   QM_ASSIGN                                        ~8      1
         18    > > RETURN                                                   ~8
   33    19*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FAqZGY%3A25%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.3 ms | 1396 KiB | 19 Q