By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,949 Members | 1,869 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,949 IT Pros & Developers. It's quick & easy.

Test if an item is an object or a reference to an object

P: n/a
Hi,

Using php 4.4.4, let's say I have an array of objects or references to
objects. If I picked out an arbitrary element, $n, how would I know
if that was an object or a reference to an object?

Thanks, - Dave

Mar 1 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
la***********@zipmail.com wrote:
Using php 4.4.4, let's say I have an array of objects or references to
objects. If I picked out an arbitrary element, $n, how would I know
if that was an object or a reference to an object?
You can't.

--
----------------------------------
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: 23:30:18 up 9 days, 4:30, 1 user, load average: 0.79, 0.43, 0.36

Mar 1 '07 #2

P: n/a
Rik
la***********@zipmail.com <la***********@zipmail.comwrote:
Using php 4.4.4, let's say I have an array of objects or references to
objects. If I picked out an arbitrary element, $n, how would I know
if that was an object or a reference to an object?
Why does it matter? Look at it this way: all variables are references to
specific values in memory, sometimes more variables then one reference
this bit, often it's just a single one.

What's the actual problem you're trying to solve?
--
Rik Wasmus
Mar 1 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.