1--TEST-- 2metaphone() tests 3--FILE-- 4<?php 5 6var_dump(metaphone()); 7var_dump(metaphone("")); 8var_dump(metaphone(-1)); 9var_dump(metaphone(-1, -1)); 10 11var_dump(metaphone("valid phrase", -1)); 12var_dump(metaphone("valid phrase", 0)); 13var_dump(metaphone("valid phrase", 10000)); 14 15$array = array( 16"They fell forward, grovelling heedlessly on the cold earth.", 17"But the shadow of horror wheeled and returned, passing lower now, right above them, sweeping the fen-reek with its ghastly wings.", 18"And then it was gone, flying back to Mordor with the speed of the wrath of Sauron; and behind it the wind roared away, leaving the Dead Marshes bare and bleak.", 19"The naked waste, as far as the eye could pierce, even to the distant menace of the mountains, was dappled with the fitful moonlight." 20); 21 22foreach($array as $str) { 23 var_dump(metaphone($str)); 24} 25 26echo "Done\n"; 27?> 28--EXPECTF-- 29Warning: metaphone() expects at least 1 parameter, 0 given in %s on line %d 30NULL 31string(0) "" 32string(0) "" 33bool(false) 34bool(false) 35string(6) "FLTFRS" 36string(6) "FLTFRS" 37string(26) "0FLFRWRTKRFLNKHTLSLN0KLTR0" 38string(56) "BT0XTFHRRHLTNTRTRNTPSNKLWRNRFTBF0MSWPNK0FNRKW0TSFSTLWNKS" 39string(69) "ANT0NTWSKNFLYNKBKTMRTRW00SPTF0R0FSRNNTBHNTT0WNTRRTWLFNK0TTMRXSBRNTBLK" 40string(56) "0NKTWSTSFRS0YKLTPRSFNT0TSTNTMNSF0MNTNSWSTPLTW00FTFLMNLFT" 41Done 42