在严格模式下,只有与声明类型完全匹配的变量才被接受。 严格类型检查模式可以按以下方式启用:
declare(strict_types=1)
有关详细信息,请参阅 Strict typing (php.net)。