Put declare(strict_types=1) immediately after the opening PHP tag, before namespaces or other statements: ~~~php <?php declare(strict_types=1); function add(int $left, int $right): int { return $left + $right; } ~~~ Add parameter and return types throughout and use strict === comparisons instead of loose ==.
Installs into .claude/skills of the current project.
Are you the author of Php Language?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-php-language-125a1372)
Put declare(strict_types=1) immediately after the opening PHP tag, before namespaces or other statements:
~~~php
<?php
declare(strict_types=1);
function add(int $left, int $right): int
{
return $left + $right;
}
~~~
Add parameter and return types throughout and use strict === comparisons instead of loose ==.