ID: 9186
Updated by: zeev
Reported By: [EMAIL PROTECTED]
Old-Status: Closed
Status: Analyzed
Bug Type: Documentation problem
Assigned To:
Comments:
Ok, it should remain open as a documentation problem...
Previous Comments:
ID: 9186
User Update by: [EMAIL PROTECTED]
Status: Analyzed
Bug Type: Documentation problem
Description: string compare with "==" does not work correctly
Ok, I accept this. But I don't think that is a good idea
to compare apples with pears with the answer 'yes they are
fruit' without any
ID: 9186
Updated by: hholzgra
Reported By: [EMAIL PROTECTED]
Status: Analyzed
Bug Type: Documentation problem
Assigned To:
Comments:
this autoconversion is usefull when dealing with html form input
(for which php is used every once in a while afaik :)
as html has no numric input elements,
ID: 9186
User Update by: [EMAIL PROTECTED]
Status: Analyzed
Bug Type: Documentation problem
Description: string compare with "==" does not work correctly
The conversation is useful. I know this because HTML form
parameters, MySQL result sets are strings even if they are
represent numbers.
ID: 9186
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Analyzed
Old-Bug Type: Scripting Engine problem
Bug Type: Documentation problem
Assigned To:
Comments:
Previous Comments:
---
ID: 9186
Updated by: zak
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Bogus
Bug Type: Scripting Engine problem
Assigned To:
Comments:
Actually, this is a feature - it is described in the manual. Strings that look like
numbers are converted to numbers. Large numbers - like the ones
ID: 9186
User Update by: [EMAIL PROTECTED]
Status: Bogus
Bug Type: Scripting Engine problem
Description: string compare with "==" does not work correctly
I think there is no reason to convert any type if both
operands of the comparision are of the same type. It costs
time and it's completely
ID: 9186
Updated by: zak
Reported By: [EMAIL PROTECTED]
Old-Status: Bogus
Status: Open
Bug Type: Scripting Engine problem
Assigned To:
Comments:
Incorrectly flagged as bogus.
Previous Comments:
---
[2001-02-09 10:59:10]
Alan van den Bosch wrote:
[snip]
This issue arises from the loose typing in PHP with the introduction of
first class boolean type (the true and false keywords), from my
understanding the sematics being applied here are as follows (poetic
license
applied liberally);
== is (has become?) a
At 17:59 9/2/2001, [EMAIL PROTECTED] wrote:
ID: 9186
User Update by: [EMAIL PROTECTED]
Status: Bogus
Bug Type: Scripting Engine problem
Description: string compare with "==" does not work correctly
I think there is no reason to convert any type if both
operands of the comparision are of the same
At 19:34 9/2/2001, Hartmut Holzgraefe wrote:
Alan van den Bosch wrote:
== is (has become?) a boolean logic operator, dealing in terms of 'true'
and 'false' values, so its terms are type cast to either 'true' or 'false'.
When applied to strings, a 'false' string is zero length or contains
Zeev Suraski wrote:
At 17:59 9/2/2001, [EMAIL PROTECTED] wrote:
ID: 9186
User Update by: [EMAIL PROTECTED]
Status: Bogus
Bug Type: Scripting Engine problem
Description: string compare with "==" does not work correctly
I think there is no reason to convert any type if both
operands of
Yep, we should. It came up many times over the years, this behavior
haven't changed since early PHP 3.0.0...
Zeev
At 19:47 9/2/2001, Zak Greant wrote:
Zeev Suraski wrote:
At 17:59 9/2/2001, [EMAIL PROTECTED] wrote:
ID: 9186
User Update by: [EMAIL PROTECTED]
Status: Bogus
Bug Type:
How is this? I modified what Zeev said a wee bit:
== is a 'loose' comparison operator [1].
In most cases, this is more convenient - the operator does the right thing
without needing any coaxing. In some cases, things will happen that are
confusing - particularly when comparing values that have
OK, I was way off base in my reasoning... :-)
Thanks for the clarification Zeev and Zak.
Alan.
How is this? I modified what Zeev said a wee bit:
== is a 'loose' comparison operator [1].
In most cases, this is more convenient - the operator does the right thing
without needing any
15 matches
Mail list logo