3v4l.org

run code in 300+ PHP versions simultaneously
<?php $gatos = array( array( "id" => 1, "name" => "Titus", "fecha" => "2013-05-14 00:00:00", ), array( "id" => 2, "name" => "Gato", "fecha" => "2010-08-11 00:00:00", ), array( "id" => 3, "name" => "Pepito", "fecha" => "2011-02-28 00:00:00", ), array( "id" => 4, "name" => "Juancito", "fecha" => "2008-05-30 00:00:00", ), ); usort($gatos, function($gato1,$gato2){ return strcmp(date_create($gato1["fecha"])->format("md"),date_create($gato2["fecha"])->format("md")); }); var_dump($gatos);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Z0oVH
function name:  (null)
number of ops:  10
compiled vars:  !0 = $gatos
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   26     1        INIT_FCALL                                               'usort'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FZ0oVH%3A26%240'
   28     4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
   30     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FZ0oVH%3A26%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Z0oVH
function name:  {closure}
number of ops:  22
compiled vars:  !0 = $gato1, !1 = $gato2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   27     2        INIT_FCALL                                               'strcmp'
          3        INIT_FCALL                                               'date_create'
          4        FETCH_DIM_R                                      ~2      !0, 'fecha'
          5        SEND_VAL                                                 ~2
          6        DO_ICALL                                         $3      
          7        INIT_METHOD_CALL                                         $3, 'format'
          8        SEND_VAL_EX                                              'md'
          9        DO_FCALL                                      0  $4      
         10        SEND_VAR                                                 $4
         11        INIT_FCALL                                               'date_create'
         12        FETCH_DIM_R                                      ~5      !1, 'fecha'
         13        SEND_VAL                                                 ~5
         14        DO_ICALL                                         $6      
         15        INIT_METHOD_CALL                                         $6, 'format'
         16        SEND_VAL_EX                                              'md'
         17        DO_FCALL                                      0  $7      
         18        SEND_VAR                                                 $7
         19        DO_ICALL                                         $8      
         20      > RETURN                                                   $8
   28    21*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FZ0oVH%3A26%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.95 ms | 941 KiB | 22 Q