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