3v4l.org

run code in 300+ PHP versions simultaneously
<?php $win = array('Name'=> array('Jane Doe ', 'Nash Patel ', 'Joe Public '), 'Date'=> array('7 October 2015 ', '14 October 2014 ', '12 October 2016 ')); $dates = $win["Date"]; $names = $win["Name"]; usort($dates, "date_sort"); asort($names); var_dump($dates); Var_dump($names); function date_sort($a, $b) { return strtotime($a) - strtotime($b); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kLjRh
function name:  (null)
number of ops:  19
compiled vars:  !0 = $win, !1 = $dates, !2 = $names
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        FETCH_DIM_R                                      ~4      !0, 'Date'
          2        ASSIGN                                                   !1, ~4
   10     3        FETCH_DIM_R                                      ~6      !0, 'Name'
          4        ASSIGN                                                   !2, ~6
   12     5        INIT_FCALL                                               'usort'
          6        SEND_REF                                                 !1
          7        SEND_VAL                                                 'date_sort'
          8        DO_ICALL                                                 
   13     9        INIT_FCALL                                               'asort'
         10        SEND_REF                                                 !2
         11        DO_ICALL                                                 
   15    12        INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
   16    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                                 
   21    18      > RETURN                                                   1

Function date_sort:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kLjRh
function name:  date_sort
number of ops:  11
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   20     2        INIT_FCALL                                               'strtotime'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5        INIT_FCALL                                               'strtotime'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $3      
          8        SUB                                              ~4      $2, $3
          9      > RETURN                                                   ~4
   21    10*     > RETURN                                                   null

End of function date_sort

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.77 ms | 1004 KiB | 17 Q