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" ]); usort( $array, function($a, $b) use($mmm) { sscanf("$a 32 dec", "%[^0-9] %d %s", $aWord, $aDay, $aMon); sscanf("$b 32 dec", "%[^0-9] %d %s", $bWord, $bDay, $bMon); return [$aWord, $mmm[$aMon], $aDay] <=> [$bWord, $mmm[$bMon], $bDay]; } ); var_export($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2hrZK
function name:  (null)
number of ops:  15
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                                               'usort'
   26     6        SEND_REF                                                 !0
   27     7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F2hrZK%3A27%240'
          8        BIND_LEXICAL                                             ~5, !1
   31     9        SEND_VAL                                                 ~5
         10        DO_ICALL                                                 
   33    11        INIT_FCALL                                               'var_export'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F2hrZK%3A27%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2hrZK
function name:  {closure}
number of ops:  32
compiled vars:  !0 = $a, !1 = $b, !2 = $mmm, !3 = $aWord, !4 = $aDay, !5 = $aMon, !6 = $bWord, !7 = $bDay, !8 = $bMon
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
   28     3        INIT_FCALL                                               'sscanf'
          4        NOP                                                      
          5        FAST_CONCAT                                      ~9      !0, '+32+dec'
          6        SEND_VAL                                                 ~9
          7        SEND_VAL                                                 '%25%5B%5E0-9%5D+%25d+%25s'
          8        SEND_REF                                                 !3
          9        SEND_REF                                                 !4
         10        SEND_REF                                                 !5
         11        DO_ICALL                                                 
   29    12        INIT_FCALL                                               'sscanf'
         13        NOP                                                      
         14        FAST_CONCAT                                      ~11     !1, '+32+dec'
         15        SEND_VAL                                                 ~11
         16        SEND_VAL                                                 '%25%5B%5E0-9%5D+%25d+%25s'
         17        SEND_REF                                                 !6
         18        SEND_REF                                                 !7
         19        SEND_REF                                                 !8
         20        DO_ICALL                                                 
   30    21        INIT_ARRAY                                       ~13     !3
         22        FETCH_DIM_R                                      ~14     !2, !5
         23        ADD_ARRAY_ELEMENT                                ~13     ~14
         24        ADD_ARRAY_ELEMENT                                ~13     !4
         25        INIT_ARRAY                                       ~15     !6
         26        FETCH_DIM_R                                      ~16     !2, !8
         27        ADD_ARRAY_ELEMENT                                ~15     ~16
         28        ADD_ARRAY_ELEMENT                                ~15     !7
         29        SPACESHIP                                        ~17     ~13, ~15
         30      > RETURN                                                   ~17
   31    31*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F2hrZK%3A27%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.97 ms | 1400 KiB | 21 Q