note 81595 added to function.settype
| From: | robin at barafranca dot com | Date: | Wed, 05 Mar 2008 12:20:50 +0000 |
| Subject: | note 81595 added to function.settype | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-136761@lists.php.net to get a copy of this message | ||
Just a quick note, as this caught me out very briefly:
settype() returns bool, not the typecasted variable - so:
$blah = settype($blah, "int"); // is wrong, changes $blah to 0 or 1
settype($blah, "int"); // is correct
Hope this helps someone else who makes a mistake.. ;)
----
Server IP: 83.170.119.58
Probable Submitter: 83.100.231.149
----
Manual Page -- http://www.php.net/manual/en/function.settype.php
Edit -- https://master.php.net/note/edit/81595
Del: integrated -- https://master.php.net/note/delete/81595/integrated
Del: useless -- https://master.php.net/note/delete/81595/useless
Del: bad code -- https://master.php.net/note/delete/81595/bad+code
Del: spam -- https://master.php.net/note/delete/81595/spam
Del: non-english -- https://master.php.net/note/delete/81595/non-english
Del: in docs -- https://master.php.net/note/delete/81595/in+docs
Del: other reasons-- https://master.php.net/note/delete/81595
Reject -- https://master.php.net/note/reject/81595
Search -- https://master.php.net/manage/user-notes.php