且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

PHP json_encode返回空结构

更新时间:2023-02-15 15:14:34

您具有受保护的私有属性,因此无法使用任何函数(包括json_encode())直接访问对象的属性.

You have protected and private attributes, so you can not use any functions, including json_encode() to access directly to your object's property.

使用 JSONSerialize