npx skills add sickn33/agentic-awesome-skills --skill php --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# PHP: Idiomatic Efficiency Reference ## When to Use - Use this skill when the task matches this description: Language-specific super-code guidelines for php. ## Table of Contents 1. [Arrays & Collections](#arrays) 2. [Type Safety](#types) 3. [Error Handling](#errors) 4. [String Handling](#strings) 5. [OOP & Modern PHP](#oop) 6. [Functions & Closures](#functions) 7. [Anti-patterns specific to PHP](#antipatterns) --- ## 1. Arrays & Collections {#arrays} ```php // ❌ Manual accumulation $result = []; foreach ($items as $item) { if ($item->isActive()) { $result[] = strtoupper($item->getName()); } } // ✅ $result = array_map( fn($i) => strtoupper($i->getName()), array_filter($items, fn($i) => $i->isActive()) ); ``` ```php // ❌ Manual key-value grouping $grouped = []; foreach ($items as $item) { $grouped[$item->getCategory()][] = $item; } // ✅ (PHP 8.1+) — or use the loop above; PHP lacks a built-in groupBy // The foreach is actually idiomatic PHP for grouping. No need to force array_* here. ``` ```php // ❌ Checking isset then accessing if (isset($data['key'])) { $value = $data['key']; } else { $value = 'default'; } // ✅ $value = $data['key'] ?? 'default'; ``` ```php // ❌ array_push for s
- When to Use
- Table of Contents
- 1. Arrays & Collections {#arrays}
- 2. Type Safety {#types}
- 3. Error Handling {#errors}
- 4. String Handling {#strings}
- 5. OOP & Modern PHP {#oop}
- 6. Functions & Closures {#functions}
- 7. Anti-patterns specific to PHP {#antipatterns}
- Limitations
What does the php skill do?
Language-specific super-code guidelines for php.
How do I install it?
Run `npx skills add sickn33/agentic-awesome-skills --skill php --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From sickn33/agentic-awesome-skills, a repository with 44,414 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.