Based on what I have seen you are better off using non-objects for things you want to cache.  As an example there is a lot less overhead when using APC with arrays vs objects 

To use objects or arrays?  What is the “Drupal way”?  I’d rather write code using objects (php’s stdClass).  But I’ve run into a ton of problems using objects on php4.

The CiviCRM folks have this handy guide for php5 -> php4:

 

http://wiki.civicrm.org/confluence/display/CRM/Writing+PHP4+Compatible+code

 

But even after using it, I’m having difficulties.  I’m starting to conclude that I should convert all my object references to arrays.  I only see a couple of object references in core, and none to anything complicated (arrays of objects, objects pointing to objects, object elements of arrays of objects, etc). 

 

Doug Green

www.douggreenconsulting.com

www.civicactions.com

 

Changing the world one node at a time!