显示下拉菜单

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

Example #1 : test success
Example #2 : test success
Example #3 : test success
Example #1
$input = [
  
=> [
    
=> 100,
    
'color' => 'red',
  ],
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'array' => [
      
=> 0,
      
=> 'color',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #2
$input = [
  
=> [
    
=> 'blue',
    
=> 'red',
    
=> 'green',
    
=> 'blue',
    
=> 'blue',
  ],
  
=> 'blue',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'array' => [
      
=> 0,
      
=> 3,
      
=> 4,
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #3
$input = [
  
=> [
    
'color' => [
      
=> 'blue',
      
=> 'red',
      
=> 'green',
    ],
    
'size' => [
      
=> 'small',
      
=> 'medium',
      
=> 'large',
    ],
  ],
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'array' => [
      
=> 'color',
      
=> 'size',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]