PortLAMP Courses: Thursday

by Daniel Smith

There is fountain near the Willamette River. A circle of
high velocity water jets converge in the middle. There are signs
that warn you about the intense water there ...

This convention is a little like that. You are in the middle,
the conference tracks surround you, and you get hit with
a firehose of information. There are no warning signs
here - you just learn at some point that the schedule,
with all of its "kid in a candy store" appeal, can clobber
you if you try to take on too much in such a short period of time.

Therefore, I move that next year's convention be expanded to three weeks!

At the end of the week, I will look back at some other
Thursday sessions (JabberJazz, IngyOnKwiki, and Amazon Web Services).
I was particularly interested in the new capabilities of
PHP5, and will highlight those today.


The lone PHP session I attended on Thursday was "Introduction to
PHP5", presented by Shane Caraveo (Shane at ActiveState.com).
The presentation is available at talks.php.net/show/php5-intro-oscon-2003.

There are tons of improvements in PHP5, such as access (public,
protected, private), unified constructors and destructors, object
dereferencing ( $f->bar()->barabarina(); ), abstract classes,
and interfaces. I will pick a
couple to mention, because there's too much to write about on a deadline.

PHP5: Exceptions

Hooray! We get try/catch/throw. The Exception class is the base
you extend. See the slide on Page 27 for an example. A nice
thing about this for me is that it is something I liked about
C++, and it gets rid of the need for many "if" statements.

PHP5: Bundled SQLite

SQLite has excellent SQL
standards support. It is an embedded flat file SQL DB (you
pretend it's MySQL) You can call it via a function or OO
interface. It is good for developing something where you are not
sure if customers will have access to MySQL, etc. A very cool
thing about it is that it can exist as an in-memory db. Having
said all that, my gut tells me that this will be useful for
small projects, but it remains to be seen how it will stack
up against MySQL or other relational DBs for anything big. Still,
it definitely has a place.

PHP5: Stream Servers

Easy servers! Stream servers allow you to open up a socket on a port,
creating a server. Basic example:

$s = stream_socket_server('tcp://localhost:8080');
while ($client = stream_socket_accept($s))
$line = fgets($client)
echo $line;

PHP5: Timelines

Beta 1 has been out for about a week. Don't use it for production.
Shane says a release in 4-5 months is optimistic, and that
his conservative guess is 6-9 months.

A Thank You, and a note

Getting together a conference like this is never easy. I think
the O'Reilly folks have done a great job. Yes, I personally
want a "Power Strip In Every Pot", but I also note that
most things ran very well. Thanks to chromatic for
giving me a chance to write, and thanks to the people
behind the scenes that figured out enough of the
networking stuff to keep most of us online, most
of the time.

If I can refer to a Slashdotism for a second,
which starts with "In Soviet Russia...", I'll leave
off with this point: most people with tech ambitions
in some quite undeveloped parts of the world
have never experienced what we live everyday:
Consider the hotel lobby, full of folks lounging around with
wireless 5 pound devices
that can reach out to any Internet spot on the
planet. That is a powerful capability. Having
lived long enough to remember the very first
Compaq "luggables", I marvel, and am thankful
for the progress.