note 86419 added to language.types.type-juggling
| From: | hek at theeks dot net | Date: | Fri, 17 Oct 2008 16:24:55 +0000 |
| Subject: | note 86419 added to language.types.type-juggling | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-145457@lists.php.net to get a copy of this message | ||
It would be useful to know the precedence (for lack of a better word) for 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!
----
Server IP: 209.41.74.194
Probable Submitter: 65.207.72.66
----
Manual Page -- http://www.php.net/manual/en/language.types.type-juggling.php
Edit -- https://master.php.net/note/edit/86419
Del: integrated -- https://master.php.net/note/delete/86419/integrated
Del: useless -- https://master.php.net/note/delete/86419/useless
Del: bad code -- https://master.php.net/note/delete/86419/bad+code
Del: spam -- https://master.php.net/note/delete/86419/spam
Del: non-english -- https://master.php.net/note/delete/86419/non-english
Del: in docs -- https://master.php.net/note/delete/86419/in+docs
Del: other reasons-- https://master.php.net/note/delete/86419
Reject -- https://master.php.net/note/reject/86419
Search -- https://master.php.net/manage/user-notes.php