3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numbers = ['10 Apple', '2 Grapes', '3 Apples', '3.2 Apples', '3.1 Apples', '3.3 Apples', '3.10 Apples', '3.11 Apples', 'Lots of Apples']; array_multisort( array_map( fn($v) => sscanf($v, '%f')[0] ?? PHP_INT_MAX, $numbers ), $numbers ); var_export($numbers);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YeqtG
function name:  (null)
number of ops:  14
compiled vars:  !0 = $numbers
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'array_multisort'
    6     2        INIT_FCALL                                               'array_map'
    7     3        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
          4        SEND_VAL                                                 ~2
    8     5        SEND_VAR                                                 !0
    6     6        DO_ICALL                                         $3      
    8     7        SEND_VAL                                                 $3
   10     8        SEND_REF                                                 !0
    5     9        DO_ICALL                                                 
   13    10        INIT_FCALL                                               'var_export'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
         13      > 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/YeqtG
function name:  {closure}
number of ops:  10
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'sscanf'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%25f'
          4        DO_ICALL                                         $1      
          5        FETCH_DIM_IS                                     ~2      $1, 0
          6        COALESCE                                         ~3      ~2
          7        QM_ASSIGN                                        ~3      9223372036854775807
          8      > RETURN                                                   ~3
          9*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.69 ms | 1005 KiB | 17 Q