php-guidelines

Installation
SKILL.md

PHP Guidelines

Overview

Modern PHP guidelines based on the PHP Manual covering PHP 8.x idioms. PHP has evolved dramatically — write modern, type-safe PHP, not legacy PHP 5 patterns.

Core Principles

  • Always use declare(strict_types=1) — first line of every file
  • Type everything — parameters, returns, properties, constants
  • Use === not == — loose comparison causes security bugs
  • Errors are exceptions — catch them, don't suppress with @
  • Composition over inheritance — interfaces + traits over deep hierarchies

Strict Types

<?php
declare(strict_types=1);  // MUST be first statement
Installs
3
GitHub Stars
3
First Seen
Feb 9, 2026
php-guidelines — peixotorms/odinlayer-skills