3v4l.org

run code in 300+ PHP versions simultaneously
<?php $chars = '6Ata7~58jh&*(*HLy^)&a[yjJ>8]G8,$9<Y;B:%^'; $lookup = array_fill_keys(range('a', 'z'), 0) + array_fill_keys(range('A', 'Z'), 1) + array_fill_keys(range(0, 9), 2); $array = str_split($chars); usort($array, fn($a, $b) => ($lookup[$a] ?? 3) <=> ($lookup[$b] ?? 3)); echo implode($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/m3e5i
function name:  (null)
number of ops:  43
compiled vars:  !0 = $chars, !1 = $lookup, !2 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '6Ata7%7E58jh%26%2A%28%2AHLy%5E%29%26a%5ByjJ%3E8%5DG8%2C%249%3CY%3BB%3A%25%5E'
    5     1        INIT_FCALL                                               'array_fill_keys'
          2        INIT_FCALL                                               'range'
          3        SEND_VAL                                                 'a'
          4        SEND_VAL                                                 'z'
          5        DO_ICALL                                         $4      
          6        SEND_VAR                                                 $4
          7        SEND_VAL                                                 0
          8        DO_ICALL                                         $5      
          9        INIT_FCALL                                               'array_fill_keys'
         10        INIT_FCALL                                               'range'
         11        SEND_VAL                                                 'A'
         12        SEND_VAL                                                 'Z'
         13        DO_ICALL                                         $6      
         14        SEND_VAR                                                 $6
         15        SEND_VAL                                                 1
         16        DO_ICALL                                         $7      
         17        ADD                                              ~8      $5, $7
         18        INIT_FCALL                                               'array_fill_keys'
         19        INIT_FCALL                                               'range'
         20        SEND_VAL                                                 0
         21        SEND_VAL                                                 9
         22        DO_ICALL                                         $9      
         23        SEND_VAR                                                 $9
         24        SEND_VAL                                                 2
         25        DO_ICALL                                         $10     
         26        ADD                                              ~11     ~8, $10
         27        ASSIGN                                                   !1, ~11
    6    28        INIT_FCALL                                               'str_split'
         29        SEND_VAR                                                 !0
         30        DO_ICALL                                         $13     
         31        ASSIGN                                                   !2, $13
    7    32        INIT_FCALL                                               'usort'
         33        SEND_REF                                                 !2
         34        DECLARE_LAMBDA_FUNCTION                          ~15     [0]
         35        BIND_LEXICAL                                             ~15, !1
         36        SEND_VAL                                                 ~15
         37        DO_ICALL                                                 
    8    38        INIT_FCALL                                               'implode'
         39        SEND_VAR                                                 !2
         40        DO_ICALL                                         $17     
         41        ECHO                                                     $17
         42      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/m3e5i
function name:  {closure}
number of ops:  12
compiled vars:  !0 = $a, !1 = $b, !2 = $lookup
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
          3        FETCH_DIM_IS                                     ~3      !2, !0
          4        COALESCE                                         ~4      ~3
          5        QM_ASSIGN                                        ~4      3
          6        FETCH_DIM_IS                                     ~5      !2, !1
          7        COALESCE                                         ~6      ~5
          8        QM_ASSIGN                                        ~6      3
          9        SPACESHIP                                        ~7      ~4, ~6
         10      > RETURN                                                   ~7
         11*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.47 ms | 1007 KiB | 18 Q