If you want an associative array after decoding the json_encode output, then yes. Otherwise, you end up with an object and have to access your values like so: $decodedArray->plaintext and $decodedArray->filename versus, when using true in the optional parameter, you can use it as $decodedArray['plaintext'] and $decodedArray['filename']