显示下拉菜单

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

Example #1 : test success
Example #2 : test success
Example #3 : test success
Example #1
$input = [
  
=> 'Hello fri3nd, you\'re
       looking          good today!'
,
  
=> 1,
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'mixed' => [
      
=> 'Hello',
      
=> 'fri',
      
=> 'nd',
      
=> 'you\'re',
      
=> 'looking',
      
=> 'good',
      
=> 'today',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #2
$input = [
  
=> 'Hello fri3nd, you\'re
       looking          good today!'
,
  
=> 2,
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'mixed' => [
      
=> 'Hello',
      
=> 'fri',
      
10 => 'nd',
      
14 => 'you\'re',
      
28 => 'looking',
      
45 => 'good',
      
50 => 'today',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #3
$input = [
  
=> 'Hello fri3nd, you\'re
       looking          good today!'
,
  
=> 1,
  
=> 'àáãç3',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'mixed' => [
      
=> 'Hello',
      
=> 'fri3nd',
      
=> 'you\'re',
      
=> 'looking',
      
=> 'good',
      
=> 'today',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]