显示下拉菜单

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

Example #1 : test success
Example #2 : test success
Example #3 : test success
Example #4 : test success
Example #5 : test success
Example #6 : test success
Example #7 : test success
Example #8 : test success
Example #9 : test success
Example #1
$input = [
  
=> 'cube',
  
=> [
    
=> 1,
    
=> 2,
    
=> 3,
    
=> 4,
    
=> 5,
  ],
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'array' => [
      
=> 1,
      
=> 8,
      
=> 27,
      
=> 64,
      
=> 125,
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #2
$input = [
  
=> 'double',
  
=> [
    
=> 1,
    
=> 2,
    
=> 3,
    
=> 4,
    
=> 5,
  ],
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'array' => [
      
=> 2,
      
=> 4,
      
=> 6,
      
=> 8,
      
=> 10,
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #3
$input = [
  
=> 'show_Spanish',
  
=> [
    
=> 1,
    
=> 2,
    
=> 3,
    
=> 4,
    
=> 5,
  ],
  
=> [
    
=> 'uno',
    
=> 'dos',
    
=> 'tres',
    
=> 'cuatro',
    
=> 'cinco',
  ],
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'array' => [
      
=> 'The number 1 is called uno in Spanish',
      
=> 'The number 2 is called dos in Spanish',
      
=> 'The number 3 is called tres in Spanish',
      
=> 'The number 4 is called cuatro in Spanish',
      
=> 'The number 5 is called cinco in Spanish',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #4
$input = [
  
=> 'map_Spanish',
  
=> [
    
=> 1,
    
=> 2,
    
=> 3,
    
=> 4,
    
=> 5,
  ],
  
=> [
    
=> 'uno',
    
=> 'dos',
    
=> 'tres',
    
=> 'cuatro',
    
=> 'cinco',
  ],
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'array' => [
      
=> [
        
=> 'uno',
      ],
      
=> [
        
=> 'dos',
      ],
      
=> [
        
=> 'tres',
      ],
      
=> [
        
=> 'cuatro',
      ],
      
=> [
        
=> 'cinco',
      ],
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #5
$input = [
  
=> NULL,
  
=> [
    
=> 1,
    
=> 2,
    
=> 3,
    
=> 4,
    
=> 5,
  ],
  
=> [
    
=> 'one',
    
=> 'two',
    
=> 'three',
    
=> 'four',
    
=> 'five',
  ],
  
=> [
    
=> 'uno',
    
=> 'dos',
    
=> 'tres',
    
=> 'cuatro',
    
=> 'cinco',
  ],
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'array' => [
      
=> [
        
=> 1,
        
=> 'one',
        
=> 'uno',
      ],
      
=> [
        
=> 2,
        
=> 'two',
        
=> 'dos',
      ],
      
=> [
        
=> 3,
        
=> 'three',
        
=> 'tres',
      ],
      
=> [
        
=> 4,
        
=> 'four',
        
=> 'cuatro',
      ],
      
=> [
        
=> 5,
        
=> 'five',
        
=> 'cinco',
      ],
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #6
$input = [
  
=> 'cb1',
  
=> [
    
'stringkey' => 'value',
  ],
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'array' => [
      
'stringkey' => [
        
=> 'value',
      ],
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #7
$input = [
  
=> 'cb2',
  
=> [
    
'stringkey' => 'value',
  ],
  
=> [
    
'stringkey' => 'value',
  ],
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'array' => [
      
=> [
        
=> 'value',
        
=> 'value',
      ],
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #8
$input = [
  
=> NULL,
  
=> [
    
'stringkey' => 'value',
  ],
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'array' => [
      
'stringkey' => 'value',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #9
$input = [
  
=> NULL,
  
=> [
    
'stringkey' => 'value',
  ],
  
=> [
    
'stringkey' => 'value',
  ],
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'array' => [
      
=> [
        
=> 'value',
        
=> 'value',
      ],
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]