3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrays = array( array( 'resize', 'width' => 2, 'height' => 3), array( 'resize', 'height' => 3, 'width' => 2), array( 'resize', 'scale', 'height' => 3, 'width' => 2), ); foreach($arrays as $array){ uksort($array, function($key1, $key2){ if(is_numeric($key1)){ return is_numeric($key2)? ($key1- $key2): -1; } else { return is_numeric($key2)? 1 : strcmp($key1, $key2); } }); var_dump($array); //echo serialize($array)."\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 12
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 12
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/l5nmg
function name:  (null)
number of ops:  14
compiled vars:  !0 = $arrays, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1      > FE_RESET_R                                       $3      !0, ->12
          2    > > FE_FETCH_R                                               $3, !1, ->12
   10     3    >   INIT_FCALL                                               'uksort'
          4        SEND_REF                                                 !1
          5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fl5nmg%3A10%240'
   16     6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
   17     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
    9    11      > JMP                                                      ->2
         12    >   FE_FREE                                                  $3
   19    13      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fl5nmg%3A10%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 16
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 22
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l5nmg
function name:  {closure}
number of ops:  29
compiled vars:  !0 = $key1, !1 = $key2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   11     2        INIT_FCALL                                               'is_numeric'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5      > JMPZ                                                     $2, ->16
   12     6    >   INIT_FCALL                                               'is_numeric'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $3      
          9      > JMPZ                                                     $3, ->13
         10    >   SUB                                              ~4      !0, !1
         11        QM_ASSIGN                                        ~5      ~4
         12      > JMP                                                      ->14
         13    >   QM_ASSIGN                                        ~5      -1
         14    > > RETURN                                                   ~5
         15*       JMP                                                      ->28
   14    16    >   INIT_FCALL                                               'is_numeric'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                         $6      
         19      > JMPZ                                                     $6, ->22
         20    >   QM_ASSIGN                                        ~7      1
         21      > JMP                                                      ->27
         22    >   INIT_FCALL                                               'strcmp'
         23        SEND_VAR                                                 !0
         24        SEND_VAR                                                 !1
         25        DO_ICALL                                         $8      
         26        QM_ASSIGN                                        ~7      $8
         27    > > RETURN                                                   ~7
   16    28*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fl5nmg%3A10%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.54 ms | 1400 KiB | 21 Q