note 94130 added to function.gettype
| From: | Yukull at osu1 dot php dot net | Date: | Sun, 18 Oct 2009 10:57:29 +0000 |
| Subject: | note 94130 added to function.gettype | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-161849@lists.php.net to get a copy of this message | ||
I would like to compare type of 2 vars, I can use getType like that :
<?
function sameType($a,$b)
{
return getType($a)==getType($b);
}
?>
but is their a better way who don't involves string comparison ?
----
Server IP: 195.221.21.36
Probable Submitter: 92.147.109.48
----
Manual Page -- http://www.php.net/manual/en/function.gettype.php
Edit -- https://master.php.net/note/edit/94130
Del: integrated -- https://master.php.net/note/delete/94130/integrated
Del: useless -- https://master.php.net/note/delete/94130/useless
Del: bad code -- https://master.php.net/note/delete/94130/bad+code
Del: spam -- https://master.php.net/note/delete/94130/spam
Del: non-english -- https://master.php.net/note/delete/94130/non-english
Del: in docs -- https://master.php.net/note/delete/94130/in+docs
Del: other reasons-- https://master.php.net/note/delete/94130
Reject -- https://master.php.net/note/reject/94130
Search -- https://master.php.net/manage/user-notes.php