3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = range(0, 23); shuffle($array); usort( $array, fn($a, $b) => ($a !== 9) <=> ($b !== 9) ?: strlen($b) <=> strlen($a) ?: $a <=> $b ); var_export($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/u4IXI
function name:  (null)
number of ops:  17
compiled vars:  !0 = $array
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'range'
          1        SEND_VAL                                                     0
          2        SEND_VAL                                                     23
          3        DO_ICALL                                             $1      
          4        ASSIGN                                                       !0, $1
    4     5        INIT_FCALL                                                   'shuffle'
          6        SEND_REF                                                     !0
          7        DO_ICALL                                                     
    6     8        INIT_FCALL                                                   'usort'
    7     9        SEND_REF                                                     !0
    8    10        DECLARE_LAMBDA_FUNCTION                              ~4      [0]
   12    11        SEND_VAL                                                     ~4
    6    12        DO_ICALL                                                     
   14    13        INIT_FCALL                                                   'var_export'
         14        SEND_VAR                                                     !0
         15        DO_ICALL                                                     
         16      > 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/u4IXI
function name:  {closure:/in/u4IXI:8}
number of ops:  15
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
    9     2        IS_NOT_IDENTICAL                                     ~2      !0, 9
          3        IS_NOT_IDENTICAL                                     ~3      !1, 9
          4        SPACESHIP                                            ~4      ~2, ~3
          5        JMP_SET                                              ~5      ~4, ->10
   10     6        STRLEN                                               ~6      !1
          7        STRLEN                                               ~7      !0
          8        SPACESHIP                                            ~8      ~6, ~7
          9        QM_ASSIGN                                            ~5      ~8
         10        JMP_SET                                              ~9      ~5, ->13
   11    11        SPACESHIP                                            ~10     !0, !1
         12        QM_ASSIGN                                            ~9      ~10
         13      > RETURN                                                       ~9
   12    14*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.18 ms | 1317 KiB | 17 Q