RE: [PHP] different and logic between PHP4 and PHP5

2007-03-15 Thread Vieri
--- "Ford, Mike" <[EMAIL PROTECTED]> wrote: > And I can testify from personal experience that this > has been true since the very early days of 4.0.x (in > fact, I still have a 4.0.5 installation hanging > around that I tested it on...!!), so I do not know > where the *BLEEP* the OP can have been

RE: [PHP] different and logic between PHP4 and PHP5

2007-03-15 Thread Robert Cummings
On Thu, 2007-03-15 at 10:30 +, Ford, Mike wrote: > On 12 March 2007 23:06, Richard Lynch wrote: > > > On Mon, March 12, 2007 1:53 pm, Vieri wrote: > > > The following code: > > > > > > > > $b=""; > > > $c="df"; > > > $a=($b and $c); > > > > Why in the world would you use 'and' on two string

RE: [PHP] different and logic between PHP4 and PHP5

2007-03-15 Thread Ford, Mike
On 12 March 2007 23:06, Richard Lynch wrote: > On Mon, March 12, 2007 1:53 pm, Vieri wrote: > > The following code: > > > > > $b=""; > > $c="df"; > > $a=($b and $c); > > Why in the world would you use 'and' on two strings? > > What is that supposed to even mean?... > > Type-cast them to numbe

RE: [PHP] different and logic between PHP4 and PHP5

2007-03-15 Thread Ford, Mike
On 14 March 2007 01:00, Larry Garfield wrote: > On Tuesday 13 March 2007 7:50 am, Vieri wrote: > > > > //$b=3; > > $c=3; > > $a=($b and $c); > > echo "A = ".$a; > > > > > > > in PHP4 I get: > > A = 0 > > and in PHP5 I get: > > A = > > > I could call this lazyness on our part or code > > porta

Re: [PHP] different and logic between PHP4 and PHP5

2007-03-13 Thread Larry Garfield
On Tuesday 13 March 2007 7:50 am, Vieri wrote: > //$b=3; > $c=3; > $a=($b and $c); > echo "A = ".$a; > ?> > > in PHP4 I get: > A = 0 > and in PHP5 I get: > A = > I could call this lazyness on our part or code > portability through PHP versions or better yet, bad > inherited coding right from the

Re: [PHP] different and logic between PHP4 and PHP5

2007-03-13 Thread Jon Anderson
Vieri wrote: I didn't code this. We have inherited some code that worked this way in php4: if string1 and string2 exist then return true or 1 else return false or 0 in php5 it just doesn't behave the same way. Rather than echo, try var_dump. You'll find that it's returning a boolean, which is

Re: [PHP] different and logic between PHP4 and PHP5

2007-03-13 Thread Vieri
--- Richard Lynch <[EMAIL PROTECTED]> wrote: > On Mon, March 12, 2007 1:53 pm, Vieri wrote: > > The following code: > > > > > $b=""; > > $c="df"; > > $a=($b and $c); > > Why in the world would you use 'and' on two strings? > > What is that supposed to even mean?... > > Type-cast them to numbe

Re: [PHP] different and logic between PHP4 and PHP5

2007-03-12 Thread Richard Lynch
On Mon, March 12, 2007 1:53 pm, Vieri wrote: > The following code: > > $b=""; > $c="df"; > $a=($b and $c); Why in the world would you use 'and' on two strings? What is that supposed to even mean?... Type-cast them to numbers if you want to use 'and' -- Some people have a "gift" link here. Kno

Re: [PHP] different and logic between PHP4 and PHP5

2007-03-12 Thread Martin Marques
Vieri escribió: Hi The following code: Change here: echo "A = " . (int)$a; -- select 'mmarques' || '@' || 'unl.edu.ar' AS email; - Martín Marqués | Programador, DBA Centro de Telemática| Administrador

[PHP] different and logic between PHP4 and PHP5

2007-03-12 Thread Vieri
Hi The following code: yields: A = 0 in PHP 4 and A = in PHP 5 How can I get the same behavior in PHP5 as in PHP4 without changing the source code? Is there an option in php.ini I'm missing? Expectin