On 8/10/07, Zoltán Németh [EMAIL PROTECTED] wrote:
2007. 08. 10, péntek keltezéssel 02.31-kor Jan Reiter ezt írta:
Hi!
Thank you for your response!
The only intention of my code was to investigate the (back then) unexpected
behavior of the if statement.
With $var['test'] set to
2007. 08. 10, péntek keltezéssel 02.31-kor Jan Reiter ezt írta:
Hi!
Thank you for your response!
The only intention of my code was to investigate the (back then) unexpected
behavior of the if statement.
With $var['test'] set to blah this expression should be false
($var['test'] ==
On Thu, August 9, 2007 1:24 am, Phil Curry wrote:
$userValues = ' 1';
line 102 echo ($userValues['afterDark']); // outputs 1
line 103 if ( $userValues['afterDark'] == 0 ) {// passes
When using echo to display debug output ALWAYS surround the data with
some kind
how can this be? This is not the first time I've run into a situation
like this. What am I missing?
line 102echo ($userValues['afterDark']); // outputs 1
line 103if ( $userValues['afterDark'] == 0 ) {// passes
Thanks.
-Phil
--
PHP General Mailing List
Phil Curry wrote:
how can this be? This is not the first time I've run into a situation
like this. What am I missing?
line 102echo ($userValues['afterDark']); // outputs 1
line 103if ( $userValues['afterDark'] == 0 ) {// passes
Add a line at 102.5...
Please include the list when replying.
Phil Curry wrote:
Phil Curry wrote:
how can this be? This is not the first time I've run into a situation
like this. What am I missing?
line 102echo ($userValues['afterDark']); // outputs 1
line 103if ( $userValues['afterDark'] == 0
Stut wrote:
Please include the list when replying.
Phil Curry wrote:
Phil Curry wrote:
how can this be? This is not the first time I've run into a
situation like this. What am I missing?
line 102echo ($userValues['afterDark']); // outputs 1
line 103if (
Hi!
Phil:
Still I am curious what var_dump($userValues['afterDark']); at line 102.5
would return.
I managed to recreate that fault with
$var['test'] = blah;
echo ($var['test']);
if( $var['test'] == 0)
{
echo ok;
}
//this returns blahok -- not expected.
In my case Var_dump()
Jan Reiter wrote:
Hi!
Phil:
Still I am curious what var_dump($userValues['afterDark']); at line 102.5
would return.
I managed to recreate that fault with
$var['test'] = blah;
echo ($var['test']);
if( $var['test'] == 0)
{
echo ok;
}
//this returns blahok -- not expected.
In my
Please include the list when replying.
Phil Curry wrote:
Phil Curry wrote:
how can this be? This is not the first time I've run into a
situation like this. What am I missing?
line 102echo ($userValues['afterDark']); //
outputs 1
line 103if ( $userValues['afterDark'] ==
Hi!
Thank you for your response!
The only intention of my code was to investigate the (back then) unexpected
behavior of the if statement.
With $var['test'] set to blah this expression should be false
($var['test'] == 0) for what I know ...
$var['test'] = blah;
var_dump($var['test'] == 0);
Ummh, no!
(int) and (integer) perform a C style atoi() conversion.
(int)blah = integer 0
(int) = integer 0
(int)1= integer 1
(int)12 = integer 12
(1 == 0) = false
(blah == 0) = true
( (int)$userValues['afterDark'] === 0 ) only is true, if
$userValues['afterDark'] is a
12 matches
Mail list logo