1--TEST--
2soundex() tests
3--FILE--
4<?php
5
6var_dump(soundex(""));
7var_dump(soundex(-1));
8
9$array = array(
10"From",
11"that",
12"time",
13"on",
14"Sam",
15"thought",
16"that",
17"he",
18"sensed",
19"a",
20"change",
21"in",
22"Gollum",
23"again.",
24"He was more fawning and would-be friendly; but Sam surprised some strange looks in his eyes at times, especially towards Frodo."
25);
26
27foreach ($array as $str) {
28    var_dump(soundex($str));
29}
30
31echo "Done\n";
32?>
33--EXPECT--
34string(4) "0000"
35string(4) "0000"
36string(4) "F650"
37string(4) "T300"
38string(4) "T500"
39string(4) "O500"
40string(4) "S500"
41string(4) "T230"
42string(4) "T300"
43string(4) "H000"
44string(4) "S523"
45string(4) "A000"
46string(4) "C520"
47string(4) "I500"
48string(4) "G450"
49string(4) "A250"
50string(4) "H256"
51Done
52