3v4l.org

run code in 300+ PHP versions simultaneously
<?php $display = [ 'dateChanged' => '2019-09-17T19:42:56', 'dateChanged' => '2018-09-17T19:42:56', 'dateChanged' => '2017-09-17T19:42:56', 'dateChanged' => '2030-09-17T19:42:56' ]; usort($display, function($a, $b) { $ad = new DateTime($a['dateChanged']); $bd = new DateTime($b['dateChanged']); if ($ad == $bd) { return 0; } return $ad < $bd ? -1 : 1; }); print_r($display);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CqKih
function name:  (null)
number of ops:  10
compiled vars:  !0 = $display
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    9     1        INIT_FCALL                                               'usort'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FCqKih%3A9%240'
   18     4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
   20     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FCqKih%3A9%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 17
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CqKih
function name:  {closure}
number of ops:  24
compiled vars:  !0 = $a, !1 = $b, !2 = $ad, !3 = $bd
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   10     2        NEW                                              $4      'DateTime'
          3        CHECK_FUNC_ARG                                           
          4        FETCH_DIM_FUNC_ARG                               $5      !0, 'dateChanged'
          5        SEND_FUNC_ARG                                            $5
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !2, $4
   11     8        NEW                                              $8      'DateTime'
          9        CHECK_FUNC_ARG                                           
         10        FETCH_DIM_FUNC_ARG                               $9      !1, 'dateChanged'
         11        SEND_FUNC_ARG                                            $9
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !3, $8
   13    14        IS_EQUAL                                                 !2, !3
         15      > JMPZ                                                     ~12, ->17
   14    16    > > RETURN                                                   0
   17    17    >   IS_SMALLER                                               !2, !3
         18      > JMPZ                                                     ~13, ->21
         19    >   QM_ASSIGN                                        ~14     -1
         20      > JMP                                                      ->22
         21    >   QM_ASSIGN                                        ~14     1
         22    > > RETURN                                                   ~14
   18    23*     > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
269.76 ms | 1400 KiB | 17 Q