[PHP-DEV] PHP 4.0 Bug #9186 Updated: string compare with == does not work correctly

2001-02-15 Thread zeev
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:

[PHP-DEV] PHP 4.0 Bug #9186 Updated: string compare with == does not work correctly

2001-02-15 Thread tom . anheyer
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

[PHP-DEV] PHP 4.0 Bug #9186 Updated: string compare with == does not work correctly

2001-02-15 Thread hholzgra
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,

[PHP-DEV] PHP 4.0 Bug #9186 Updated: string compare with == does not work correctly

2001-02-15 Thread tom . anheyer
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.

[PHP-DEV] PHP 4.0 Bug #9186 Updated: string compare with == does not work correctly

2001-02-14 Thread sniper
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: ---

[PHP-DEV] PHP 4.0 Bug #9186 Updated: string compare with == does not work correctly

2001-02-09 Thread zak
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

[PHP-DEV] PHP 4.0 Bug #9186 Updated: string compare with == does not work correctly

2001-02-09 Thread tom . anheyer
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

[PHP-DEV] PHP 4.0 Bug #9186 Updated: string compare with == does not work correctly

2001-02-09 Thread zak
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]

Re: [PHP-DEV] PHP 4.0 Bug #9186 Updated: string compare with == does not work correctly

2001-02-09 Thread Zak Greant
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

Re: [PHP-DEV] PHP 4.0 Bug #9186 Updated: string compare with == does not work correctly

2001-02-09 Thread Zeev Suraski
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

Re: [PHP-DEV] PHP 4.0 Bug #9186 Updated: string compare with == does not work correctly

2001-02-09 Thread Zeev Suraski
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

Re: [PHP-DEV] PHP 4.0 Bug #9186 Updated: string compare with == does not work correctly

2001-02-09 Thread Zak Greant
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

Re: [PHP-DEV] PHP 4.0 Bug #9186 Updated: string compare with == does not work correctly

2001-02-09 Thread Zeev Suraski
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:

Re: [PHP-DEV] PHP 4.0 Bug #9186 Updated: string compare with == does not work correctly

2001-02-09 Thread Zak Greant
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

Re: [PHP-DEV] PHP 4.0 Bug #9186 Updated: string compare with == does not work correctly

2001-02-09 Thread Alan van den Bosch
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