ID:          20726
 Updated by:  [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
 Status:      Open
-Bug Type:    Feature/Change Request
+Bug Type:    Documentation problem
 PHP Version: 4.2.3
 New Comment:

We need to keep it in the Documentation category, otherwise the doc-ppl
won't see it.

Derick


Previous Comments:
------------------------------------------------------------------------

[2002-12-01 07:12:02] [EMAIL PROTECTED]

refiling into (documentation) feature request for the following
reason:

the problem i pointed out was a missconception of mine, not a wrong
info in the docs, thus not a 'documentation problem'

given that, i should have submitted information about it as a feature
request for new information in the manual, instead of blaming the
manual for my missconception. i wish to appologize for that (btw it is
one of the best reference manuals i've seen).

last, since no other php newbie has given me authority for speaking on
his behalf, i must refrase that statement of mine: the issue messed
with my brain. it made it stop working for a while...

------------------------------------------------------------------------

[2002-11-29 08:44:37] [EMAIL PROTECTED]

IMO it can be documented better indeed, for example at this page:
http://www.php.net/manual/en/language.operators.comparison.php

Derick

------------------------------------------------------------------------

[2002-11-29 08:39:13] [EMAIL PROTECTED]

yesterday i submitted an 'foo'==0 bug (id=20708) in the Scripting
Engine problem Category, well i understand that was stupid and my bug
went bogus just as ahundret other submitted 'foo'==0 bugs i later found
in the database.

but i think it is an issue.

the manual states:

Example: $a == $b 
Name: Equal 
Result: TRUE if $a is equal to $b
 
this is not specific enough for a language where 'foo'==0 evaluates
TRUE.

when i write 'foo'==0 i do *not* want to know if they are same type

i want to know one of those:
'foo'==(string)0 *or* (int)'foo'==0

obviously, only one of those can happen. if you want the other thing to
happen, you must cast explicitly. the manual doesn't state which one
happens implicitly.

automatic type casting is great for coding, but one can't just let it
happen, one must know exactly what it does. 

i hope you understand that a nonempty string to be the same as a zero
integer messes with the brain of any php newbie used to fixed type
languages if you don't explain to him why.

the manual shouldn´t just state that 'foo' equals to 0, because for
this to happen php seems to use a cast precedence for comparison
operations - whatever it is, the manual should explain it.

PS:
if you bogus me again i wont insist.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=20726&edit=1


-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to