PHP's json_encode function as a second optional param ( bitmasks ). Can someone explain to me what they're for and when I should use them and why?
Thanks
The purpose is to get rid of special character in the JSON output. In certain situation the special characters may have other meanings and you just want to pass the JSON through without making use of any of those.
Suppose you want to send the json inside some XML. You don't want any < in there messing with the xml. So you just use the option to get rid of those so it doesn't cause any problems.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With