3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrDates = array( "Tom" => "12/25/2009", "Jill" => "01/10/2008", "Fred" => "02/12/2000", "Anne" => "03/17/1948", "Steve" => "03/06/1948", "Sue" => "11/25/1972", "Jack" => "10/23/2009", "John" => "01/14/2008", "Bethany" => "02/22/2000", "George" => "03/27/1948", "Nancy" => "03/16/1948", "James" => "11/24/1972", "Henry" => "11/13/2009", "Harriet" => "11/10/2008", "Karen" => "12/12/2000", "Ken" => "05/17/1948", "Clark" => "05/06/1948", "Sheila" => "9/23/2009", ); function cmp($a, $b) { if ($a == $b) return 0; return (strtotime($a) < strtotime($b))? -1 : 1; } uasort($arrDates, "cmp"); print_r($arrDates);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nrDXb
function name:  (null)
number of ops:  9
compiled vars:  !0 = $arrDates
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   28     1        INIT_FCALL                                               'uasort'
          2        SEND_REF                                                 !0
          3        SEND_VAL                                                 'cmp'
          4        DO_ICALL                                                 
   29     5        INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

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

End of function cmp

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.94 ms | 1396 KiB | 19 Q