json_decode function is not part of PHP 5.1, so I cannot use it. Is there any other function for this version?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Before PHP 5.2, you can use the JSON PECL extension.
In fact, it is the extension that has been integrated into PHP 5.2 (quoting) :
Some other solutions would be to use some component developped in PHP.
Some time ago (about one year ago), I used the
Zend_Jsoncomponent of Zend Framework, with PHP 5.1.Even if Zend Framework requires PHP 5.2, that component can be extracted (I think it depends only on one other component — maybe
Zend_Exception, or something like that) — and one year ago, it was possible to use it with PHP 5.1.The [official JSON website][4] also links to several PHP-based or PHP-oriented components — you might want to take a look at that list.