3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(array(0), 'first' => array('first'), array(1),array(2), 'second'=>array('second'), array(3), array(4)); uksort($array, function ($ka, $kb) { if (is_int($ka)) { if (!is_int($kb)) return 1; return $ka - $kb; } else { if (is_int($kb)) return -1; return strcmp($ka, $kb); } }); print_r($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7ZbWT
function name:  (null)
number of ops:  10
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'uksort'
          2        SEND_REF                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
   14     4        SEND_VAL                                                 ~2
    5     5        DO_ICALL                                                 
   15     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7ZbWT
function name:  {closure}
number of ops:  20
compiled vars:  !0 = $ka, !1 = $kb
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        TYPE_CHECK                                   16          !0
          3      > JMPZ                                                     ~2, ->11
    7     4    >   TYPE_CHECK                                   16  ~3      !1
          5        BOOL_NOT                                         ~4      ~3
          6      > JMPZ                                                     ~4, ->8
          7    > > RETURN                                                   1
    8     8    >   SUB                                              ~5      !0, !1
          9      > RETURN                                                   ~5
    6    10*       JMP                                                      ->19
   11    11    >   TYPE_CHECK                                   16          !1
         12      > JMPZ                                                     ~6, ->14
         13    > > RETURN                                                   -1
   12    14    >   INIT_FCALL                                               'strcmp'
         15        SEND_VAR                                                 !0
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                         $7      
         18      > RETURN                                                   $7
   14    19*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.54 ms | 1001 KiB | 16 Q