3v4l.org

run code in 300+ PHP versions simultaneously
<?php $trans = [ "-,.AjawbpfmnrhHxXsSqkgtTdD=/()[]<>{}'*#I1234567890&@", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" ]; $list = [ 'wr' => 'A1', 'wr-qA' => 'A3', 'wr,w' => 'A4', 'wr-mw' => 'A2', 'wrs' => 'A6', 'wrD' => 'A8', 'wrS' => 'A7', 'wr.w' => 'A5', '=k' => 'A10', 'Dd' => 'A9' ]; uksort( $list, function ($a, $b) use ($trans) { return strtr($a, ...$trans) <=> strtr($b, ...$trans); } ); var_export($list);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GRce2
function name:  (null)
number of ops:  12
compiled vars:  !0 = $trans, !1 = $list
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, <array>
   21     2        INIT_FCALL                                               'uksort'
   22     3        SEND_REF                                                 !1
   23     4        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
          5        BIND_LEXICAL                                             ~4, !0
   25     6        SEND_VAL                                                 ~4
   21     7        DO_ICALL                                                 
   28     8        INIT_FCALL                                               'var_export'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
         11      > 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/GRce2
function name:  {closure}
number of ops:  16
compiled vars:  !0 = $a, !1 = $b, !2 = $trans
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
   24     3        INIT_FCALL                                               'strtr'
          4        SEND_VAR                                                 !0
          5        SEND_UNPACK                                              !2
          6        CHECK_UNDEF_ARGS                                         
          7        DO_ICALL                                         $3      
          8        INIT_FCALL                                               'strtr'
          9        SEND_VAR                                                 !1
         10        SEND_UNPACK                                              !2
         11        CHECK_UNDEF_ARGS                                         
         12        DO_ICALL                                         $4      
         13        SPACESHIP                                        ~5      $3, $4
         14      > RETURN                                                   ~5
   25    15*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.9 ms | 1003 KiB | 16 Q