PHPCon East 2003 Opening Keynote: Rasmus Lerdorf

by Brian Jepson

Here are my raw notes on Rasmus' keynote talk from PHPCon East 2003 (corrections, additions, etc. welcome):

PHP History

10 Years ago, Rasmus wrote CGI programs in C. Lots of code to solve
a simple web problem. He says you couldn't expect your HTML
designers to go in, edit your C code, and recompile. So, lots of
folks switched to Perl and

Still, he argues that Perl and CGI wasn't something that an HTML
designer could jump in and start editing.

What he wanted was PHP; code embedded in the HTML: "A block of raw
HTML followed by the minimum amount of logic possible."

In PHP's early days, he'd read the html file on disk using seeks,
and this had a huge penalty in things like loops, where PHP would
have to go back and forth in the file. Then he discovered mmap(2).

He figures that since he didn't know how to write a scripting
language, PHP couldn't have been a scripting language :-) (until PHP3,
when people who knew how to write scripting languages got involved).

PHP Adoption

He feels that PHP caught on because it solved 80% of the web problem
without requiring you to master a programming language; over
time, that missing 20% got added.

PHP has grown; he says that 3 out of 10 sites are PHP-driven. That
is based on Netcraft, so I wonder if that means that they are
PHP-enabled. Is PHP enabled by default on most or many Linux
distributions? All the Unix hosting providers I've seen support PHP, but being PHP-enabled doesn't mean a site is necessarily using it. But I think it's still pretty widely-used (I use a mix of PHP, Perl, and other random stuff on

A Good Solution

He says that a good solution should have a shallow learning curve,
instant gratification, build on what you know and have great
documentation. It should solve simple problems easily, but also be able
to solve the most complex of problems.

It should be secure, borrow from the best, and run everywhere.
(being free is great, too).

He also says that a good solution should teach the basics by not
hiding the problem (he says many GUI-based tools obscure the
problem--he's bashing Cold Fusion for letting the user point and click for the simple stuff and then requiring the user to
ramp up with their markup language when it's time to do something
more complex).

Application Architecture

He's pushing an architecure like this (a discipline for PHP

  • HTML Templates ($DOCUMENT_ROOT/*.php) (5% PHP, 95% HTML)

  • Template Helpers ($DOCUMENT_ROOT/*.inc) (header functions, footer functions, common layout elements)

  • Business Logic (/usr/local/php/*.inc)

  • C/C++ Core Code (stuff you couldn't do in PHP; most apps won't
    have this)