I just did a test where I created 100 array elements using each of the two methods.

On the first run, before my opcode cache gets a chance to cache it, it used 196 bytes less memory to use stdClass. On the second run, after the opcode cache kicked in, the stdClass method used 320 bytes less memory.

It makes no difference in the memory used whether or not you use "stdClass();" or "stdClass;".

I also took a look at the time taken to create 100K instances. The difference is negligible at about 0.015 seconds difference for the 100K instances. It does seem that "(object) NULL" is always slower than "new stdClass()" and both slower than "new stdClass;". Both with and without the opcode cache kicking in.

Omiting the "new" operator from before "stdClass;" nearly doubles the time taken. I'm not sure it would even work properly without that operator.