3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'list[P] = 1', 'list[A] = 1', 'list[F] = 2', 'list[B] = 1' ]; array_multisort( array_map( fn($v) => sscanf($v, '%*s = %d')[0], $array ), array_keys($array), $array ); var_export($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2hTBI
function name:  (null)
number of ops:  18
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        INIT_FCALL                                               'array_multisort'
   11     2        INIT_FCALL                                               'array_map'
   12     3        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
          4        SEND_VAL                                                 ~2
   13     5        SEND_VAR                                                 !0
   11     6        DO_ICALL                                         $3      
   13     7        SEND_VAL                                                 $3
   15     8        INIT_FCALL                                               'array_keys'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $4      
         11        SEND_VAL                                                 $4
   16    12        SEND_REF                                                 !0
   10    13        DO_ICALL                                                 
   19    14        INIT_FCALL                                               'var_export'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                                 
         17      > 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/2hTBI
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'sscanf'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%25%2As+%3D+%25d'
          4        DO_ICALL                                         $1      
          5        FETCH_DIM_R                                      ~2      $1, 0
          6      > RETURN                                                   ~2
          7*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.43 ms | 1015 KiB | 18 Q