#46334 [Opn->Bgs]: Documentation enhancement request -- Type Juggling help page

From: Date: Tue, 04 Nov 2008 16:44:41 +0000
Subject: #46334 [Opn->Bgs]: Documentation enhancement request -- Type Juggling help page
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-1317@lists.php.net to get a copy of this message
ID: 46334 Updated by: vrana@php.net Reported By: hek at theeks dot net -Status: Open +Status: Bogus Bug Type: Documentation problem Operating System: Irrelevant PHP Version: Irrelevant New Comment: It's already documented at http://www.php.net/manual/en/language.operators.comparison.php (Comparison with Various Types). Previous Comments: ------------------------------------------------------------------------ [2008-10-17 16:30:48] hek at theeks dot net Description: ------------ On the "Type Juggling" help page at http://us.php.net/manual/en/language.types.type-juggling.php (or on some other related page) it would be useful to document the precedence (for lack of a better word) PHP follows when type juggling. This entry currently explains that "if either operand is a float, then both operands are evaluated as floats, and the result will be a float" but could (and I think should) provide a hierarchy that indicates, for instance, "between an int and a boolean, int wins; between a float and an int, float wins; between a string and a float, string wins" and so on (and don't count on my example accurately capturing the true hierarchy, as I haven't actually done the tests to figure it out). Thanks! ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46334&edit=1

« previous php.doc.bugs (#1317) next »