Reusable code snippets using Live Templates in PHPStrom

Let’s just admit this. If you’re a developer who works with PHP and you haven’t heard about PHPStrom, you’re assumed to be living in the rocks. Because PHPStrom is the best PHP IDE exist right now IMHO. The tagline on the homepage of it reads as “The lightening-smart IDE for PHP” and it’s really true. It has got all the features you’d need in order to become a fluent PHP programmer.

Read More

A closer look at Invokable classes in PHP

In PHP, Invokables refer to any class that may be instantiated without any constructor arguments. In other words, one should be able to create an instance solely be calling new $className(). To implement an invokable class, one needs to use __invoke() magic method of PHP. Before we understand how invokable exactly works, let’s take a look why invokable classes even exists in PHP.

Read More