Building Strong Foundations through Declarations If you come from the olden days of PHP, you might have been spoiled by having PHP automatically declare types for you. The convenience is not something you want every time. Sometimes you want to be able to specify what type of data you want to store or return. It is still optional in PHP; it’s up to you whether you want to use it or not. If you do use it, which I encourage you to do so, and you specify the wrong data type, PHP will throw an error. As of PHP 7,