NYCPHP Meetup

NYPHP.org

[nycphp-talk] single quote vs. double quote

Anirudh Zala arzala at gmail.com
Tue Apr 10 23:34:18 EDT 2007


On Tuesday 10 April 2007 21:35, Paul M Jones wrote:
> On Apr 10, 2007, at 11:03 AM, Rahmin Pavlovic wrote:
> > Does anyone know approximately how much longer double-quotes take
> > to parse
> > in a controlled environment?
>
> My understanding is "little if any"; recent versions of PHP 4 have
> eliminated the time-difference in single/double quote parsing.

I don't think complete elimination is possible. Because it is obvious that 
when some thing is looked first for "expansion" and then taking 'as it is', 
if it is not to be expanded, then there must be some time-difference. However 
it could be that time-difference may have been reduced. But I don't think 
complete elimination is possible. To me 2nd effect of "bad practicing" is 
more important as far as coding is concerned.

Even if there is little time-difference, this also tells that one is using 
inappropriate ways while coding. So this issue has impact from both sides. To 
me it is against good practice. To some extent it is quite fine but when 
people "double quote" paragraph of 100 lines containing static data, it would 
be called as bad practice.

Thanks

Anirudh Zala

>
> Paul M. Jones  <http://paul-m-jones.com>
>
> Solar: Simple Object Library and Application Repository
> for PHP5.  <http://solarphp.com>
>
> Join the Solar community wiki!  <http://solarphp.org>
>
> Savant: The simple, elegant, and powerful solution for
> templates in PHP.  <http://phpsavant.com>
>
>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php



More information about the talk mailing list