Author Archives: Larry Garfield

A new type of PHP, part 2: Scalar types

      No Comments on A new type of PHP, part 2: Scalar types

In our last installment, we talked about the benefits of more robust variable typing in PHP 7, and specifically the new support for typed return values.  That is already a big boon to the maintainability of our code, but PHP 7 goes a step further. So far, we’ve only talked about typing against classes and interfaces.  We’ve been able to… Read more »

A new type of PHP, part 1: Return types

Every significant release of PHP adds a number of new features, with one or two that really define the release.  For PHP 5.3, it was namespaces and anonymous functions.  For PHP 5.4, it was traits.  For PHP 5.5, generators.  For PHP 5.6, variadics. While PHP 7 has a large array of new improvements to make developers lives easier and involve… Read more »