note 40170 added to language.operators.comparison
| From: | "KBJ�rgensen" at rn2 dot php dot net | Date: | Tue, 24 Feb 2004 03:17:39 +0000 |
| Subject: | note 40170 added to language.operators.comparison | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-65626@lists.php.net to get a copy of this message | ||
Well, it's easier without the version checking (then it's just doing the real
calculation):
<?php
function is_identical( $left, $right )
{
return ( $left == $right ) && ( gettype( $left ) == gettype( $right ) );
}
?>
or if you wanna get ultrapicky (left some whitespace in there for clarity :) ):
<? function is_identical($left,$right) return ($left==$right) &&
(gettype($left)==gettype($right)) ?>
- KB Jørgensen | http://kb-t.dk
----
Manual Page -- http://www.php.net/manual/en/language.operators.comparison.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+40170
Delete -- http://master.php.net/manage/user-notes.php?action=delete+40170&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+40170&report=yes
Search -- http://master.php.net/manage/user-notes.php