Use PascalCase for classes, camelCase for methods and variables, and SNAKE_CASE for class constants: ~~~php final class UserService { private const MAX_RETRIES = 3; public function getUserById(int $userId): ?User { // ... } } ~~~ Use descriptive names and avoid magic numbers or ambiguous abbreviations.
Installs into .claude/skills of the current project.
Are you the author of Php Best Practices?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-php-best-practices-d28efec6)
Use PascalCase for classes, camelCase for methods and variables, and SNAKE_CASE for class constants:
~~~php
final class UserService
{
private const MAX_RETRIES = 3;
public function getUserById(int $userId): ?User
{
// ...
}
}
~~~
Use descriptive names and avoid magic numbers or ambiguous abbreviations.