Best way to create an empty object in JSON with PHP?

前端 未结 7 1783
情深已故
情深已故 2020-11-27 03:26

To create an empty JSON object I do usually use:

json_encode((object) null);

casting null to an object works, but is there any other prefer

7条回答
提交回复
热议问题