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(DateTime::createFromFormat('Y-m-d H:i:s',$gato1["fecha"])->format("md"),DateTime::createFromFormat('Y-m-d H:i:s',$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/iRsgT
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%2FiRsgT%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%2FiRsgT%3A26%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iRsgT
function name:  {closure}
number of ops:  24
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_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
          4        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
          5        FETCH_DIM_R                                      ~2      !0, 'fecha'
          6        SEND_VAL                                                 ~2
          7        DO_FCALL                                      0  $3      
          8        INIT_METHOD_CALL                                         $3, 'format'
          9        SEND_VAL_EX                                              'md'
         10        DO_FCALL                                      0  $4      
         11        SEND_VAR                                                 $4
         12        INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
         13        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
         14        FETCH_DIM_R                                      ~5      !1, 'fecha'
         15        SEND_VAL                                                 ~5
         16        DO_FCALL                                      0  $6      
         17        INIT_METHOD_CALL                                         $6, 'format'
         18        SEND_VAL_EX                                              'md'
         19        DO_FCALL                                      0  $7      
         20        SEND_VAR                                                 $7
         21        DO_ICALL                                         $8      
         22      > RETURN                                                   $8
   28    23*     > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.93 ms | 1396 KiB | 19 Q