9 ms·
json_decode('...', false) will deserialize into a stdClass - which I guess implements magic methods __set() and __get. I've never checked this but I guess that
by thinkindie 4y ago
json_decode('...', false) will deserialize into a stdClass - which I guess implements magic methods __set() and __get. I've never checked this but I guess that would do the trick has mentioned in the article itself.
- kijin 4y agostdClass doesn't implement magic methods -- any properties you add are added directly to the object, not to any kind of internal data store -- but it is explicitly marked as an exception to the proposed rule.