Helpers to manage PHP object state