When PHP reads Cookie in JSON format, the escape symbol cannot be deleted?

my Cookie goes like this:

cookie={"key":"V0tRTVF=","uid":"2","username":""}

I want PHP to accept these parameters. According to reason, PHP backend to obtain, and then transfer the code can be.

but I find that the value obtained by $_ COOKIE ["cookie"] is as follows:

{\"cookie\":\"V0tRTVF=\",\"uid\":\"2\",\"username\":\"\"}

has been escaped? It doesn"t matter, stripslashes or regular can delete the slash, right?
result-cannot be deleted!

< hr >

[update at 19:09] I just heard the great god tell me that this is just a front-end display problem. In fact, there is no escape character in PHP!
through my tests, direct json_decode ($cookie, true); conversion is fine.
but I still don"t know why the front end will show an extra\. No, no, no.

Mar.23,2021

php directly json_decode ($cookie, true); is that all right?


according to your code test, it is found that the Cookie accepted by the background has not been escaped and there is no "\". When you say there is an extra front end, where does it come from? Do you see it in browser development tools?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea8dfd-1f13.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea8dfd-1f13.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?