PHP has a ridiculous amout of in-built functions, even though I code in it daily I still get the surprise of finding a new one.
It was not until recently that I touched upon ‘strip_tags’, saving me amples amount of time having to write my own implementation.
My philosophy now is that if theres a function need you require, PHP most likely already has it.
Whilst working with PHP, I seem to use ‘var_dump’ a ridiculous amount, its a debugging must-have.
However, it does fall short in a few ways, especially in how it does not take into consideration that the function is almost always displayed in a HTML page - switching to the page’s source can become a pain.
Due to the pitfalls a host of projects such as Krumo and Kint have cropped up to cater for these needs.
As well as these projects, if you have XDebug installed it will replace the default ‘var_dump’ function with its own implementation that outputs the information with well-needed styling.
I have been a part-time Git user for alittle over a year now, before this I had dabbled with using Subversion but never for anything too serious.
I say part-time as throughout the year I never fully got to grips with all the ideologies/tools provided to aid in my development lifecyle process - in particular branching.
I have been a loyal MAMP Pro user for many years, I fell in love with how easy it was to setup custom hosts, without the need to tweak the hosts file myself.
However, ever since I documented my experiences with DNSMasq I have been intrested in how this article documented setting up a web-stack with Apache similar to Ruby user’s Pow.
The ability to setup a new development site with only the creation of a new folder (i.e. a folder called test could be accessible from test.dev) appealed to me greatly.
It is becoming a scarily common occurence to read about yetanotherbatch of high-profile websites user’s passwords being leaked online - for everyone’s cracking pleasure.
Whats even more shocking is how poorly these sites are storing them.
In regard to LinkedIn, it turned out that they had just stored them as un-salted, plan ‘ol MD5 hashes, that any Joe Bloggs could run a rainbow table over with extremely high success rates.
The tried and proven means of storing passwords in todays web applications is to create a hash from the user’s input, and then compare any attempted authentication with this stored value.
The trouble and confusion arises however in how to actually get to this end result, there are so many ‘wrong’ ways to go about it.