[nycphp-talk] Determing custom object types ...
jon baer
jonbaer at jonbaer.net
Tue Oct 28 13:44:12 EST 2003
i am kinda stuck on what exact method to use ... it involves a plug-in like
related class in which i need to determine if the object is actually that
type of object ...
i had been thinking is_scalar($obj) would be ok but is there a better way to
compare?
what would be a better way to accomplish this would be to use something that
can actually compare (as example):
$myObj = new MyObject();
if (is_object($myObj, gettype($myObj))) {
...
}
this wont get an exact type (should return "object") ... but basically i
want to know if you can do something like this ficticious method to
determine object equality. (coming from java where everything is an object
to begin with).
- jon
pgp key: http://www.jonbaer.net/jonbaer.asc
fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47
More information about the talk
mailing list