top | item 6919572

(no title)

jamesbrennan | 12 years ago

Is the PHP source from 1994 available anywhere? That would help determine if this is Rasmus's satire or not.

discuss

order

mappu|12 years ago

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.

abimaelmartell|12 years ago

snyff|12 years ago

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;