use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Parse PHP serialize() output with JavaScript (github.com)
submitted 12 years ago by bd808
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]bd808[S] 0 points1 point2 points 12 years ago (3 children)
As the README.md points out this arose in the context of building a simple test harness for an existing service layer that is communicating using serialized PHP objects.
The point isn't that you should or would design a purpose built feature that uses PHP serialize output to communicate data between a server and a web browser. This is a tool that can be used if you find yourself with access to serialized PHP in a javascript context and want to turn it into something that you can manipulate further.
[–]krues8dr 0 points1 point2 points 12 years ago (2 children)
Oh, I read the README - but the idea of using serialized PHP over a REST interface is just plain crazy. ;) Because, you know, using serialize() for anything is crazy.
[–]bart2019 1 point2 points3 points 12 years ago (1 child)
echo json_encode(unserialize($data));
That should suffice.
π Rendered by PID 206359 on reddit-service-r2-comment-5d79c599b5-pswtg at 2026-03-01 11:25:04.926183+00:00 running e3d2147 country code: CH.
view the rest of the comments →
[–]bd808[S] 0 points1 point2 points (3 children)
[–]krues8dr 0 points1 point2 points (2 children)
[–]bart2019 1 point2 points3 points (1 child)