Matok's PHP Blog

PHP Gotcha I

26 June 2017
I have collected some really tricky pieces of PHP code.

Fun with PHP DateTime

16 June 2017
Even some developer that work in PHP for several years don't the basis. Do you know how to work with DateTime object?
How to work with twig block to follow coding standard and not waste your time.
How to improve twig templates for better readability? You do more work for less time and also improve rendering speed.
How to fetch result set into array with keys equals to primary key in database? Do it with PDO.