Monthly Archives: December 2010

Translating a string from PHP to JSON

Based on my understanding of this subject, I’ve come up with the following function for translating a string from PHP to JSON, strictly conforming to the RFC4627. function json_string($string) { //http://www.ietf.org/rfc/rfc4627.txt $replacements = array( ‘@[\\"]@’ => ‘\\$0′, //escape backslashes and

Posted in Uncategorized

The Solidus Issue

Recently I’ve been studying code of JSON encoders for PHP strings, and I’ve discovered the solidus issue. As a side note, this was the first time I saw a slash called a solidus, and a backslash called a reverse solidus:

Posted in Uncategorized

Hard to understand XHTML validation errors

In the following, please use lowercase tags (uppercase used for clarity) No DIV allowed in A do not write <A><DIV>Hello</DIV></A> write instead <A><SPAN>Hello</SPAN></A> No INPUT allowed in FORM do not write <FORM><INPUT /></FORM> write instead <FORM><DIV><INPUT /></DIV></FORM>

Posted in Uncategorized

Dealing with Zend Studio validations

I’ve been struggling quite a while this afternoon for making Zend Studio behave as expected, and I got it! Zend Studio was marking many warnings in WSDL files that it wrongfully interpreted as HTML rather than XML. I wanted to

Posted in Uncategorized

Call to undefined function ‘output_cache_disable’

This is a Zend Studio warning that has been bugging me lately. The culprit is the file dummy.php, distributed with Zend Debugger.¬†As per the installation instructions provided by the README file, one should “4. Copy the dummy.php file to your

Posted in Uncategorized