Jump to content

PHP IS_REFERENCE - can you find if a variable is a reference?


Recommended Posts

Is there a way to determine if a variable is a reference to another variable?

 

You can determine and object type with functions such as is_array() and is_object().

 

I want to determine if a variable is a reference so I can store a single copy of that reference into the session then rebuild that reference on the other side of a session. I am building a class to take referenced php objects and php objects and serializing them so they will be stored correctly in a $_SESSION []

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.