Re: PHP textbook suggestions?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2007-04-11 at 22:47 -0500, Richard Lynch wrote:
> On Tue, April 10, 2007 9:40 pm, Robert Cummings wrote:
> >> echo "The cost is ", $cost;
> >
> > -1 Improper use of double quotes when nothing interpolated.
> 
> Yeah, I used to believe in that Urban Legend, and even promulgated it,
> once upon a time.
> 
> Then Rasmus set me straight that it's not really any faster/slower,
> and the only difference is whatever is more convenient, if you don't
> need anything interpolated.
> 
> Remember that '' examine each character in turn to detect \' and \\
> 
> It is the same order of magnitude search, with a slightly smaller
> constant number of patterns to find.
> 
> I actually do often use '' if there is nothing to interpolate, for
> longer strings especially, so that the reader (me) knows that there is
> nothing being interpolated.
> 
> But on a short enough string, it just doesn't matter which is used.

I meant the -1 in jest ;) While I do promulgate proper use of quotes, I
do so mostly because it provides better clarity of intent... as you have
stated above.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux