In a piece of code I inherited from some smart, well meaning, but a little disorganized East European consultants, I found the following class hierarchy: RestClient (abstract) JsonClient (abstract) XyzClient* […]

I have just run into a problem: a test passes fine on the CI sever, but breaks on my machine. Reason: it gets a wrong config file. Root cause: when […]

In a nuthsell, SimpleXMl has two things broken: 1. Elements that represent “emtpy” tags evaluate to false. This is weird design. 2. Other elements sometimes evaluate to false due to […]

The following code does not work as expected: $xml = simplexml_load_string(“<root><a/><b>text</b></root>”); $node = $xml->xpath(“/root/a”)[0]; if ($node) process($node); // process($node) may not be called for some valid nodes Unlike most other […]