显示下拉菜单

Test of rsort() 本页面仅提供英文版本。

Example #1 : test success
Example #2 : test success
Example #3 : test success
Example #1
$input = [
  
'__array' => [
    
=> 'lemon',
    
=> 'orange',
    
=> 'banana',
    
=> 'apple',
  ],
  
=> '$array',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'array' => [
      
=> 'orange',
      
=> 'lemon',
      
=> 'banana',
      
=> 'apple',
    ],
    
'bool' => true,
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #2
$input = [
  
'__array' => [
    
=> 'Orange1',
    
=> 'orange2',
    
=> 'Orange3',
    
=> 'orange20',
  ],
  
=> '$array',
  
=> 'SORT_NATURAL | SORT_FLAG_CASE',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'array' => [
      
=> 'orange20',
      
=> 'Orange3',
      
=> 'orange2',
      
=> 'Orange1',
    ],
    
'bool' => true,
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #3
$input = [
  
'__array' => [
    
=> 'lemon',
  ],
  
=> [
    
=> 123,
  ],
]
$expected_output = $test_output
$test_output = [
  
'errors' => [
    
=> [
      
'code' => 256,
      
'message' => 'a value cannot be passed by reference ([0 => 123])',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]