note 40170 deleted from language.operators.comparison by irchtml
| From: | irchtml@php.net | Date: | Tue, 24 Feb 2004 03:46:47 +0000 |
| Subject: | note 40170 deleted from language.operators.comparison by irchtml | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-65628@lists.php.net to get a copy of this message | ||
Note Submitter: KB Jørgensen
----
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