主页
PHP
PHP declare 关键字
tryphp_keyword_declare2
运行 ❯
×
更改方向
保存代码
更改主题
<?php declare(strict_types=1); function sum(int $a, int $b) { return $a + $b; } // Throws a fatal error because '5' is a string instead of a number sum("5", 1); ?>