This is a follow up article on “Bring High Performance Into Your PHP App”, which went
quiet viral with over 100k visits. This does not only show that many people still
struggle with PHP and its performance, but also that people are highly interested in
a solution to this kind of issues. PHP-PM could be one solution. But first things first.
In this article I want to show you how you can get the maximum performance out of your PHP application.
Most apps don’t really use the whole power of PHP, instead just activate APC and think that is
the most you can get. Keep reading if you want to be surprised.
In Twig it’s not possible to call filters based on a variable per default.
I’ve created therefore a small Symfony bundle that provides a new Twig filter
does exactly that: Calls filter based on a variable. Useful when you want to give your users a way
to format something and therefore the filters comes from the database.
Adding a real dynamic router in Symfony through a Bundle is unfortunately not that easy to achieve.
Beside the magic in the CMF RouterBundle you could use your classic config files (which is not dynamic)
or a Route Loader which has
some drawbacks (result is always internally cached) and isn’t really dynamic either.
imagepng function and its performance have a very interesting fact.
When you think compression in
comes with a quality-loss or you should always choose one of the highest compression
then you’ll get now new information.
While I was thinking about a system for my new blog I thought I should use just Jekyll.
Jekyll is pretty cool, but doesn’t have really much helper utils to get common tasks done well and fast.
So since I don’t want to for example ‘hardcode’ my navigation list in HTML directly (although I could :-P)
I worked out an alternative, configurable way.