3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ "Feedback 13 okt", "Feedback 11 okt", "Feedback 12 okt", "Sweet", "Feedback 9 okt", "Feedback 6 okt", "Feedback 8 jun", "Fixes", "Realisation", "Feedback 22 mar", "Do something", "Feedback 3 maj", "Feedback 1 dec", ]; $mmm = array_flip([ "jan", "feb", "mar", "apr", "maj", "jun", "jul", "aug", "sep", "okt", "nov", "dec" ]); array_multisort( preg_replace_callback( '/(.+) (\d+?) ([a-z]{3}?)/', fn($m) => "{$m[1]} {$mmm[$m[3]]} {$m[2]}", $array ), SORT_NATURAL, $array ); var_export($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DOOfc
function name:  (null)
number of ops:  21
compiled vars:  !0 = $array, !1 = $mmm
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   19     1        INIT_FCALL                                               'array_flip'
   20     2        SEND_VAL                                                 <array>
          3        DO_ICALL                                         $3      
   19     4        ASSIGN                                                   !1, $3
   25     5        INIT_FCALL                                               'array_multisort'
   26     6        INIT_FCALL                                               'preg_replace_callback'
   27     7        SEND_VAL                                                 '%2F%28.%2B%29+%28%5Cd%2B%3F%29+%28%5Ba-z%5D%7B3%7D%3F%29%2F'
   28     8        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FDOOfc%3A28%240'
          9        BIND_LEXICAL                                             ~5, !1
         10        SEND_VAL                                                 ~5
   29    11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $6      
         13        SEND_VAL                                                 $6
   31    14        SEND_VAL                                                 6
   32    15        SEND_REF                                                 !0
         16        DO_ICALL                                                 
   34    17        INIT_FCALL                                               'var_export'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FDOOfc%3A28%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DOOfc
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $m, !1 = $mmm
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        FETCH_DIM_R                                      ~2      !0, 1
          3        ROPE_INIT                                     5  ~7      ~2
          4        ROPE_ADD                                      1  ~7      ~7, '+'
          5        FETCH_DIM_R                                      ~3      !0, 3
          6        FETCH_DIM_R                                      ~4      !1, ~3
          7        ROPE_ADD                                      2  ~7      ~7, ~4
          8        ROPE_ADD                                      3  ~7      ~7, '+'
          9        FETCH_DIM_R                                      ~5      !0, 2
         10        ROPE_END                                      4  ~6      ~7, ~5
         11      > RETURN                                                   ~6
         12*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FDOOfc%3A28%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.28 ms | 1396 KiB | 21 Q