PHP7

I’ve been mostly avoiding PHP for a while, and was surprised┬áto read recently that PHP7 is heading towards release. Out of curiosity I took a look at the RFCs for the new version of the language and I can only say I am gobsmacked. And not in a good way. Some of the proposals seem…


Read More

Avoiding hidden form fields

Hidden fields in a form can be useful, but they can also pose a huge security risk. Take an example of a web page which allows a user to edit a customer’s details.

Using a browser add-on such as Firebug it’s very easy for a user to change the value of that customer_id field…


Read More

Asserting that an array contains another array in PHPUnit

I needed to test whether one array contained a subset of another array in PHPUnit. There’s no built-in function for that so if you have a similar need feel free to use the code below:


Read More