PHP Function Table / Implementation & Documentation

about - PHP 4 extensions - alphabetical PHP 4 - alphabetical PHP 3 - statistics

function str_word_count (standard)

 

Descriptionnone
Documentationnone
XML sourcenone
Translations
there is a proto in latest PHP 4 source:
mixed str_word_count(string str, [int format])
Counts the number of words inside a string. If format of 1 is specified, then the function will return an array containing all the words found inside the string. If format of 2 is specified, then the function will return an associated array where the position of the word is the key and the word itself is the value. For the purpose of this function, 'word' is defined as a locale dependent string containing alphabetic characters, which also may contain, but not start with "'" and "-" characters.

 
PHP 4 source definitionphp4/ext/standard/basic_functions.c
PHP 4 source implementationphp4/ext/standard/string.c
... introduced bynone
PHP 4.*.*
4
.
0
.
0
4
.
0
.
1
4
.
0
.
2
4
.
0
.
3
4
.
0
.
4
4
.
0
.
5
4
.
0
.
6
4
.
1
.
0
4
.
1
.
1
4
.
1
.
2
4
.
2
.
0
4
.
2
.
1
4
.
2
.
2
4
.
2
.
3
4
.
3
.
0
4
.
3
.
1
4
.
3
.
2
4
.
3
.
3
4
.
3
.
4
4
.
3
.
5
4
.
3
.
6
4
.
3
.
7
4
.
3
.
8
4
.
3
.
9
4
.
3
.
1
0
4
.
3
.
1
1
4
.
4
.
0
4
.
c
v
s
5
.
0
.
0
5
.
0
.
1
5
.
0
.
2
5
.
0
.
3
5
.
0
.
4
5
.
1
.
0
R
C
1
5
.
c
v
s
c
v
s
                
 
PHP 3 source definitionnone in current CVS
PHP 3.0.*
01234567891
0
1
1
1
2
1
3
1
4
1
5
1
6
1
7
1
8
c
v
s
                    


© 2000 Hartmut Holzgraefe     -     last update: Tuesday 15th of November 2005