When should I use stdClass and when should I use an array in php oo code?

前端 未结 7 454
太阳男子
太阳男子 2020-11-29 00:33

In the middle of a period of big refactorings at work, I wish to introduce stdClass ***** as a way to return data from functions and I\'m trying to find non-subjectives argu

相关标签:
7条回答
  • 2020-11-29 00:53

    The only OBJECTIVE vote of confidence I can find is:

    json_decode uses stdClass by default so us mortals in userland should use stdClass for similar situations.

    0 讨论(0)
提交回复
热议问题