note 73722 deleted from language.oop5.object-comparison by felipe
| From: | felipe@php.net | Date: | Sat, 15 Dec 2007 02:06:37 +0000 |
| Subject: | note 73722 deleted from language.oop5.object-comparison by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-133520@lists.php.net to get a copy of this message | ||
Note Submitter:
----
<?
class _testCompare
{
public $num=4;
}
$o1=new _testCompare;
$o2=new _testCompare;
echo 'Both eq: ',($o1==$o2?'true':'false'),"\n<br
/>\n";
$o2->num=8;
echo 'No eq: ',($o1==$o2?'true':'false'),"\n<br />\n";
$o2->num=4;
echo 'Both eq: ',($o1==$o2?'true':'false'),"\n<br
/>\n";
$o2->num='4';
echo 'Both paraeq: ',($o1==$o2?'true':'false'),"\n<br
/>\n";
/* output:
Both eq: true
No eq: false
Both eq: true
Both paraeq: true
*/
?>