News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Spindrop.us:
PHP double versus single quotes
March 06, 2007 @ 10:53:00

In a new post on the Spindrop.us site today, Dave Dash takes a look at the differences between using single quotes and double quotes in your applications.

I've been indoctrinated with the "use single quotes whenever possible" methodology, but I never really put it to the test. Is it really worth it for me to go back and look at old code that uses double quotes and change them? Like all best practices, the answer is "maybe."

To show his point, he whipped up some simple tests to get the results of using double quotes and appending, using double quotes with the variable inside, and using single quotes and appending. His results showed that the first option was the fastest, not the one with single quotes.

0 comments voice your opinion now!
doublequotes singlequotes test harness benchmark doublequotes singlequotes test harness benchmark


blog comments powered by Disqus

Similar Posts

Cal Evans' Blog: WinCache Preliminary tests look REALLY good.

Larry Garfield's Blog: readfile() not considered harmful

Chris Jones' Blog: PHP 5.4 is Gathering Momentum

Blue Parabola Blog: Lies, Damn Lies, and Statistics - Zend's Drupal Benchmarks

Paul Jones' Blog: PHP Works 2007 Teaser: Framework Benchmarks!


Community Events





Don't see your event here?
Let us know!


library symfony deployment bugfix series introduction opinion install zendserver podcast language framework release voicesoftheelephpant laravel package community tips interview api

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework