Re: [PHP] Ternary operators

2006-02-16 Thread Jochem Maas
sorry - I have had a php5 CLI at hand for so long I forgot that 'php -r' is not available in v4. that said the 'php -a' option also works (although I always find the interactive mode odd to work with) Kevin Kinsey wrote: Carl Furst wrote: Well, I tried something simple... $ php -r 'echo "hel

Re: [PHP] Ternary operators

2006-02-15 Thread Kevin Kinsey
Carl Furst wrote: Well, I tried something simple... $ php -r 'echo "hello world\n";' Error in argument 1, char 2: option not found r Error in argument 1, char 2: option not found r Usage: php [-q] [-h] [-s] [-v] [-i] [-f ] php [args...] -a Run interactively -C

RE: [PHP] Ternary operators

2006-02-15 Thread Carl Furst
t anything.. lol :) Still, thanks for your help, I was playing around with it and wanted to see what other cool stuff you could do. Carl Furst > -Original Message- > From: Jochem Maas [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 15, 2006 3:55 PM > To: Carl Furst >

Re: [PHP] Ternary operators

2006-02-15 Thread Jochem Maas
Carl Furst wrote: Hey all, Question about ternary operators. You can't really use functions INSIDE ternary operators, right? They can only be tokens and operators? So $fabulous = true; $fabulous ? echo "I am fabulous!\n" : echo "I am a looser!\n"; Would not work? testing this is quite

[PHP] Ternary operators

2006-02-15 Thread Carl Furst
Hey all, Question about ternary operators. You can't really use functions INSIDE ternary operators, right? They can only be tokens and operators? So $fabulous = true; $fabulous ? echo "I am fabulous!\n" : echo "I am a looser!\n"; Would not work? And this: echo $fabulous ? "I am fabulous!