A simple method for recursively deleting a directory and all its content in PHP.
Generating a downloadable CSV file in CakePHP seems to be a bit of a stumbling block for many relatively new to using Cake. It doesn’t need to be challenging. There’s just a few basic steps you need to put in place.
As an example we’ll consider a Subscriber model that contains contact details of people who have subscribed to our app. We want to create a CSV export of all the subscribers data.
A simple little PHP method for returning only the entries within an array that have array keys in a whitelist.
Facebook have released a new programming language based on PHP called Hack. Basically it appears to work much like PHP, but with static typing.
Today we’re releasing Hack, a programming language we developed for HHVM that interoperates seamlessly with PHP. Hack reconciles the fast development cycle of PHP with the discipline provided by static typing, while adding many features commonly found in other modern programming languages.
Looks interesting. Although I’m not all that keen on the name.
Earlier this week I came across a bug in some code that highlighted the frustration of doing comparisons with floating point numbers in PHP. Basically the code was failing when checking if one floating point number was equal to another (that was a tally of other floating numbers). Despite the two floating numbers seemingly being the same they were not equating.