Skip to content
Advertisement

Tag: equivalent

PHP equivalent of javascript JSON.stringify()

As I notice PHP’s json_encode($array) mess things up on diacritics. If I update my database column type text with javascript-created JSON passed over HTTP, everything looks good. but when I create the JSON into PHP, some characters get encoded weirdly. I have this array; Answer First off, it’s worth pointing out that PHP is not “messing up” anything. It’s escaping

PHP equivalent of send and getattr?

If Ruby gets invited to a party and brings: .. and Python gets invited to the same party and brings: .. what does PHP have to bring to the party? Bonus question: If Ruby and Python got jealous of PHP’s party-favors, what English terms would they search for in PHP’s documentation in order to talk about it behind PHP’s back?

Advertisement