php empty new object code example Example 1: php define object $x = new stdClass(); Example 2: php new stdClass object new stdClass()