Returning API responses, reading configuration files, passing data to JavaScript. There are many situations where you handle JSON in PHP. You only use two functions, json_encode() and json_decode(), ...