Re:PHP functions originally bucketed by strlen, were renamed...
by jamesbrennan on Monday December 16, 2013 @11:05PM
(#6919572)
Is the PHP source from 1994 available anywhere? That would help determine if this is Rasmus's satire or not.
[ Parent
| on HN ]
Re:PHP functions originally bucketed by strlen, were renamed...
by mappu on Monday December 16, 2013 @11:33PM
(#6919636)
It's http://museum.php.net/
EDIT: It's true, it's not satire... check out e.g. lex.c in php2/php-1.99s.tar.gz
/* Command hash table
* The hash is extremely simplistic and just based on the length of the
* command.
*/
followed by all top-level functions ordered by string length.
Re:PHP functions originally bucketed by strlen, were renamed...
by abimaelmartell on Monday December 16, 2013 @11:34PM
(#6919639)
Re:PHP functions originally bucketed by strlen, were renamed...
by snyff on Monday December 16, 2013 @11:48PM
(#6919673)
from php-2.0.1/src/lex.c
void IntFunc(char *fnc_name) { int i=0; int cmdlen = strlen(fnc_name);
while(cmd_table[cmdlen][i].cmd) {
if(!strncasecmp(fnc_name,cmd_table[cmdlen][i].cmd,cmdlen)) {
cmd_table[cmdlen][i].fnc();
break;