12 ms·
Problem with PHP is he loaded the nouns list outside of the function. Not sure whether he tested the code at all ;-)
by skore 14y ago
Problem with PHP is he loaded the nouns list outside of the function. Not sure whether he tested the code at all ;-)
- adambard 14y agoNot the PHP code, no. I can only guarantee that it almost works.
- skore 14y agoAnd I can guarantee that it's a lot of these PHP Notice: Undefined variable: nouns in nurble.php on line 12 PHP Notice: Undefined variable: nouns in nurble.php on line 12 PHP Notice: Undefined variable: nouns in nurble.php on line 12 PHP Notice: Undefined variable: nouns in nurble.php on line 12 PHP Notice: Undefined variable: nouns in nurble.php on line 12 ;-) (Also: check out explode() instead of preg_split() and with a simple pattern like this, str_ireplace might be faster, as might be searching for the word in the whole text file instead of converting it into an array.)