I was writing unit tests for a API mapping function recently and came across this interesting issue. The code I was writing tests for was in a legacy codebase that I was making changes to, and it made sense to have some unit tests in there before I started work to ensure everything worked before and after.
Generating a PDF document from a web page through PHP can be problematic. It's often something that seems quite simple, but actually generating the document can be difficult and time consuming.
Working with logic surrounding dates can sometimes be difficult and it's fairly common to come across really subtle date and time based bugs.
I was recently shown a bug in a PHP application that looks like it should be working at face value, but doesn't actually produce the correct result.
Reflection is used to gather more information about code during the runtime of the program. This allows code to inspect itself and to make small modifications, which is useful in a variety of situations.