I didn't know that about double-quoted strings (being parsed for vars), but makes sense. But don't forget that even though interpreted, the script does get cached.
However, although true, I wouldn't worry about script being a bit slower -- get a faster machine. Time you will save yourself and other people potentially reading your code in the future is worth more than a CPU. I just got a new Asus HyperThreading MB with an P4 2.53/533 Ghz processor and 1GB DDR333 RAM for $500 total. Oveclocks very nicely to right about 3Ghz. Can't wait to get my 3.06 Ghz P4 with Samsung DDR533!! RAM. Should be able to overclock that baby to right about 4Ghz.
Forget about "slightly slower". 🙂
You're right that such notation is not required in PHP unlike Java, but doesn't mean it "doesn't apply". The Str/Chr notation is more or less universal across many languages, and that is a big plus in and of itself.
I find it very practical not to output a lot of html from within php. Not doing so not only makes code much more readable in source form, but also makes working in a visual dev environment much easier. Ex: echo("<TD>She said \"$line\".</TD>"); -- if you view this in something like Frontpage, Dreamweaver, or similar in WYSIWYG mode, you'll just have a tiny Script indicator.
But if you do
<TD>She said "<?=$line?>".</TD>
you do not have to backslash anything, and if you switch to visual design view in the editor, you will actually see the table with this:
She said "<?=$line?>".
as the content of one of the cells. I actually even type the vars in the visual mode -- makes reordering columns just a drag-drop operation.
Anyway, small example. 🙂
Finally, do not know it for a fact (haven't read the source), but all this quoting and slashing is purely a syntactical mechanism, I will stop using PHP in a drop if I ever find out it uses any different amount of memory depending on what notation you used to put an identical string into the memory. There are certain things programmers should be castrated for, and this would be one of them (which I'm certain is not the case).
Cheers.