Reply to Re: .php5 versus .php

Your name:

Reply:


Posted by Kimmo Laine on 02/16/07 06:37

"McKirahan" <News@McKirahan.com> wrote in message
news:FcidnT_ei-gIkUjYnZ2dnUVZ_syunZ2d@comcast.com...
> "shimmyshack" <matt.farey@gmail.com> wrote in message
> news:1171577754.774839.155030@a34g2000cwb.googlegroups.com...
> On Feb 15, 6:05 pm, Kimmo Laine <s...@outolempi.net> wrote:
>
> [snip]
>
>> "En ole paha ihminen, mutta omenat ovat elinkeinoni." -Perttu Sirviφ
>> s...@outolempi.net | Gedoon-S @ IRCnet | rot13(x...@bhgbyrzcv.arg)
>
> oh and of course, dont forget the other typo ,->. further on the same
> line!!
>
>
> Please notify the PHP Documentation Group; here's their example:
>
> Chapter 20. Exceptions
>
> Example 20-1. Throwing an Exception
>
> <?php
> try {
> $error = 'Always throw this error';
> throw new Exception($error);
>
> // Code following an exception is not executed.
> echo 'Never executed';
>
> } catch (Exception $e) {
> echo 'Caught exception: ', $e->getMessage(), "\n";
> }


The gag here is that when using a dot, you're concatenating two strings,
when using a comma your passing two (or more) arguments to echo, so the
comma thing only works with echo which is capable of recieveing arbitrary
number of parameters, unlike print for example. Thus print('foo','bar')
doesn't work while echo('foo','bar') does. Actually it might save just a
teeny bit of cpu cycles if the strings aren't concatenated but instead
passed as separate parameters. Go figure. For the sake of readability, using
dots consistently might be wise.

--
"Ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" - lpk
http://outolempi.net/ahdistus/ - Satunnaisesti pδivittyvδ nettisarjis
spam@outolempi.net | rot13(xvzzb@bhgbyrzcv.arg)

[Back to original message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация