PHP object type implementation