3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array(array("data" => "abcd", "edit" => "1", "day" => "05", "month" => "04", "year" => "2013"), array("data" => "efgh", "edit" => "2", "day" => "07", "month" => "03", "year" => "2013")); usort($data, function ($a, $b) { $date1 = DateTime::createFromFormat("d/m/Y", $a["day"].'/'.$a["month"].'/'.$a["year"]); $date2 = DateTime::createFromFormat("d/m/Y", $b["day"].'/'.$b["month"].'/'.$b["year"]); return $date1->getTimestamp() - $date2->getTimestamp(); }); var_dump($data);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/C3Cch
function name:  (null)
number of ops:  10
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   15     1        INIT_FCALL                                               'usort'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FC3Cch%3A15%240'
   20     4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
   22     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FC3Cch%3A15%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/C3Cch
function name:  {closure}
number of ops:  33
compiled vars:  !0 = $a, !1 = $b, !2 = $date1, !3 = $date2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   16     2        INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
          3        SEND_VAL                                                 'd%2Fm%2FY'
          4        FETCH_DIM_R                                      ~4      !0, 'day'
          5        CONCAT                                           ~5      ~4, '%2F'
          6        FETCH_DIM_R                                      ~6      !0, 'month'
          7        CONCAT                                           ~7      ~5, ~6
          8        CONCAT                                           ~8      ~7, '%2F'
          9        FETCH_DIM_R                                      ~9      !0, 'year'
         10        CONCAT                                           ~10     ~8, ~9
         11        SEND_VAL                                                 ~10
         12        DO_FCALL                                      0  $11     
         13        ASSIGN                                                   !2, $11
   17    14        INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
         15        SEND_VAL                                                 'd%2Fm%2FY'
         16        FETCH_DIM_R                                      ~13     !1, 'day'
         17        CONCAT                                           ~14     ~13, '%2F'
         18        FETCH_DIM_R                                      ~15     !1, 'month'
         19        CONCAT                                           ~16     ~14, ~15
         20        CONCAT                                           ~17     ~16, '%2F'
         21        FETCH_DIM_R                                      ~18     !1, 'year'
         22        CONCAT                                           ~19     ~17, ~18
         23        SEND_VAL                                                 ~19
         24        DO_FCALL                                      0  $20     
         25        ASSIGN                                                   !3, $20
   19    26        INIT_METHOD_CALL                                         !2, 'getTimestamp'
         27        DO_FCALL                                      0  $22     
         28        INIT_METHOD_CALL                                         !3, 'getTimestamp'
         29        DO_FCALL                                      0  $23     
         30        SUB                                              ~24     $22, $23
         31      > RETURN                                                   ~24
   20    32*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FC3Cch%3A15%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.17 ms | 1400 KiB | 17 Q