Recently we stumbled upon a bug in our framework. The problem was tricky. We were submitting values to be inserted in an SQL query and some of them weren’t found by the code that actually build the query with all the escaping needed automatically. Why’s that? Because we were passing an ArrayAccess object containing the [...]
March 1st, 2008 by Loïc Hoguin · Tags: PHP5, Tips, Web:Extend · 1 Comment
PHP5 introduced the SimpleXML extension. It allows for easy manipulation of XML documents. This nice extension received a warm welcome in the community. But it unfortunately has its drawbacks.
The Problem
SimpleXML uses some little hacks to do its tricks. It overloads the -> and [] operators. What that means is that if you extend SimpleXML and [...]
February 20th, 2008 by Loïc Hoguin · Tags: PHP5, Tips, Web:Extend · 9 Comments