显示下拉菜单

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

Example #1 : test success
Example #2 : test success
Example #3 : test success
Example #4 : test success
Example #1
$input = [
  
=> 'Alien',
  
=> 10,
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => 'Alien     ',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #2
$input = [
  
=> 'Alien',
  
=> 10,
  
=> '-=',
  
=> 'STR_PAD_LEFT',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => '-=-=-Alien',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #3
$input = [
  
=> 'Alien',
  
=> 10,
  
=> '_',
  
=> 'STR_PAD_BOTH',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => '__Alien___',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #4
$input = [
  
=> 'Alien',
  
=> 6,
  
=> '___',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => 'Alien_',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]