1. 8
  1.  

  2. 2

    Working at a company that is still using PHP 4 in some places, upgrading to PHP 7 must be like a dream. Good for them.

    1. 1

      string, bool, int, float types and return type declarations sound sensible, they probably should have been added years ago. As the second web server language that I learned PHP still holds a special place in my heart. And it is better than ASP.net, the first web server language I used :P

      1. 2

        In PHP 5.6 (I think it goes down to 5.4, but not entirely sure) there were scalar type hints available. Just not return types. You could though, cast the return of a method to assure its type is safe.

        Example:

        $n = (int) '100g';
        

        This will strip the integer out of the string with no problems.