How to measure the actual size of PHP objects?

828720 pts.
Tags:
Cache storage
PHP
Storage
I've been using memcached for cache storage in my web application that's used by several of our customers. But, it only has a maximum size of 1 MB so I'm looking for a function that would measure the actual size of selected objects/arrays/etc. so I can prevent them from growing so big. This will only be used as a diagnostic tool so I can keep track of the cache performance / storage possibilities. Would anyone know of a way to measure PHP objects actual size in bytes?

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: