By bbrala on
Change record status:
Published (View all published change records)
Project:
Issue links:
Description:
Strict type decleration
If you define strict types for a PHP file, place the declare statement on a new line after the opening PHP tag surrounded by empty newlines. If the PHP file has a file level docblock the declare statement should be positioned after that. The declare statement is written without spaces around the equals sign.
<?php
/**
* @file
* This is a file docblock.
*/
declare(strict_types=1);
This is documented in the PHP Coding standards at Strict type declaration.
Impacts:
Site builders, administrators, editors
Module developers
Site templates, recipes and distribution developers