NYCPHP Meetup

NYPHP.org

[nycphp-talk] single quote vs. double quote

David Krings ramons at gmx.net
Tue Apr 3 06:36:59 EDT 2007


csnyder wrote:
> On 4/2/07, David Krings <ramons at gmx.net> wrote:
> ...
>> $langfile = fopen('$langfileloc', 'r');
>> and constantly had it fail.
> ... 
> But really, all you had to do was not quote at all.
> $langfile = fopen( $langfileloc, 'r' );

That is indeed so! Thank you. I just wonder why the examples in the PHP 
manual on php.net do not show it like that. This is so much easier and, 
gee, more logical.

> ... 
> Processor speeds being what they are, the only good reason to use
> single quotes is so you don't have to use the shift key while you type
> your code.
> 
Yea, that would be if I'd use a US kezboard. I have a german kezboard 
and I need to shift either the 2 for the double quotes or the # for the 
single quote. I wonder how programming languages would look like if 
Germans would have invented them. I mean, all or most of them. Konrad 
Zuse did indeed invent the programming language, called 'Plankalkül' in 
1943.

David



More information about the talk mailing list