|
Posted by Ivαn Sαnchez Ortega on 03/01/07 08:56
denisbytezone@gmail.com wrote:
> The first problem I still see as a problem however. Why can't it just
> compare the two memory addresses of the two objects
Because PHP, being a high-level language, does not allow the programmer to
work with pointers.
> and say "both objects are at the same location, therefore they are equal",
> instead of trying to traverse the data structures?
Jeez, just RTFM:
http://es.php.net/manual/en/language.oop5.object-comparison.php
"
On the other hand, when using the identity operator (===), object variables
are identical if and only if they refer to the same instance of the same
class.
"
--
----------------------------------
IvΓ‘n SΓ‘nchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
http://acm.asoc.fi.upm.es/~mr/
Proudly running Debian Linux with 2.6.17-1-amd64-k8 kernel, KDE3.5.3, and
PHP 5.2.0-8 generating this signature.
Uptime: 09:55:03 up 8 days, 14:55, 1 user, load average: 0.22, 0.27, 0.19
[Back to original message]
|