|
Posted by shimmyshack on 02/16/07 23:54
On Feb 16, 6:37 am, "Kimmo Laine" <s...@outolempi.net> wrote:
> "McKirahan" <N...@McKirahan.com> wrote in message
>
> news:FcidnT_ei-gIkUjYnZ2dnUVZ_syunZ2d@comcast.com...
>
>
>
> > "shimmyshack" <matt.fa...@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" - lpkhttp://outolempi.net/ahdistus/- Satunnaisesti päivittyvä nettisarjis
> s...@outolempi.net | rot13(x...@bhgbyrzcv.arg)
yeah, do you know in years of php programming I've only ever
concatenated strings when using echo - my bad - although I always use
' instead of " so brownie points there huh! perhaps its time to go
read up on some other functions too! sorry for any confusion, I don't
think ill be notifying the php doc group!
Navigation:
[Reply to this message]
|