$npx skillfedfor your agent

php

This skill covers contemporary PHP development with PHP 7.4+ and 8.x features, including strict typing, constructor promotion, union and intersection types, and attributes. It explores object-oriented patterns through traits, interfaces, and abstract classes, plus enums and custom exception handling.

PHP teaches modern PHP 8.x syntax, type system features, and OOP patterns for current development practices.

AI-generated summary based on this skill's SKILL.md

19 5 MITupdated by miles990

Decision gist · record as of 2026-01-20

PHP teaches modern PHP 8.x syntax, type system features, and OOP patterns for current development practices. This skill covers contemporary PHP development with PHP 7.4+ and 8.x features, including strict typing, constructor promotion, union and intersection types, and attributes. It explores object-oriented patterns through traits, interfaces, and abstract classes, plus enums and custom exception handling.

manual: git clone https://github.com/miles990/claude-software-skills → cp -r claude-software-skills/programming-languages/php ~/.claude/skills/php
programming-languages/php/SKILL.md · version 43b47ed3

Use it when

  • php explores OOP patterns through traits, interfaces, and abstract classes.
  • php covers dependency injection and service container patterns as core architectural concepts.

Verify before relying

Read SKILL.md below before installing (4 files). Open directory: indexed for reading, not audited.

Same gist for agents: .md · .json

Install

miles990/claude-software-skills/php · repository language: TypeScript

Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

What modern PHP 8.x syntax and type system features does php cover?

php covers contemporary PHP development with PHP 7.4+ and 8.x features including strict typing, constructor promotion, union and intersection types, and attributes. The skill emphasizes modern syntax that improves code clarity and enables better static analysis for type safety.

How do I use php traits and interfaces in object-oriented design?

php explores OOP patterns through traits, interfaces, and abstract classes. Traits enable code reuse across unrelated classes, interfaces define contracts for implementations, and abstract classes provide base functionality. Together they support flexible, maintainable architecture and design patterns.

What does php teach about dependency injection and service containers?

php covers dependency injection and service container patterns as core architectural concepts. These patterns decouple components, improve testability, and centralize object creation and configuration—essential for building scalable, maintainable applications.

How does php handle errors with custom exceptions and result types?

php teaches error handling through custom exceptions and result pattern approaches. Custom exceptions provide domain-specific error information, while result types offer functional alternatives for representing success or failure, enabling more predictable error management.

What collection and array operations does php cover?

php includes work with collections, arrays, and functional programming in PHP. The skill demonstrates modern array operations and collection patterns that support functional programming styles for cleaner, more expressive data manipulation.

Is php licensed under MIT?

Yes, php is released under the MIT license, allowing free use, modification, and distribution with minimal restrictions.

SKILL.md

Rendered from the published skill. Quoted content, verbatim.

PHP

Overview

Modern PHP (7.4+/8.x) patterns including typed properties, attributes, and modern OOP features.


Modern PHP Features

Type System

```php <?php

declare(strict_types=1);

// Typed properties (PHP 7.4+) class User { public string $id; public string $email; public ?string $name = null; public bool $active = true; public array $roles = []; public DateTimeImmutable $createdAt;

// Constructor promotion (PHP 8.0+)
public function __construct(
    public readonly string $email,
    public readonly string $name,
    private string $password
) {
    $this-&gt;id = uniqid();
    $this-&gt;createdAt = new DateTimeImmutable();
}

}

// Union types (PHP 8.0+) function process(string|int $value):

(truncated - see the full file via the links below)

File tree — 4 files
programming-languages/php/SKILL.md
programming-languages/php/templates/README.md
programming-languages/php/templates/composer.json
programming-languages/php/templates/phpunit.xml

Let your AI agent find skills like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.

wish › “Learn modern PHP 8.x syntax and type system features”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

php-specialist
by Pixel-Process-UG · Pixel-Process-UG/superkit-agents

PHP Specialist guides you through modern PHP 8.x development with language features like enums, readonly properties, and match expressions. It covers the complete toolchain: PSR interoperability, Composer dependency management, static analysis configuration, and coding standards enforcement. Apply it whenever you're authoring, reviewing, or refactoring PHP code to ensure type safety and architectural correctness.

MITupdated Mar 2026
★ 1repo stars
php-expert
by personamanagmentlayer · personamanagmentlayer/pcl

PHP Expert provides in-depth instruction on PHP 8+ language features including union types, named arguments, match expressions, attributes, and enums. Learn Laravel framework patterns, Composer dependency management, and object-oriented design principles for building robust applications.

Apache-2.0updated Mar 2026
★ 38repo stars
php
by xobotyi · xobotyi/cc-foundry

PHP guides you through modern language conventions, strict type declarations, and contemporary idioms for PHP 8.5+. It covers naming standards, type system rules, enumerations, class design patterns, and functional programming constructs to keep your code explicit and maintainable.

MITupdated Jul 2026
★ 18repo stars
php-pro
by Jeffallan · Jeffallan/claude-skills

PHP Pro is a senior-level specialist for modern PHP development with Laravel, Symfony, and PHP 8.3+. It enforces strict typing, dependency injection, and PSR compliance while generating typed DTOs, services, controllers, and comprehensive tests. Every implementation passes PHPStan level 9 and PHPUnit/Pest coverage thresholds before delivery.

MITupdated May 2026
★ 10,759repo stars
php-rules
by softspark · softspark/ai-toolkit

PHP Rules enforces coding standards covering style, frameworks, patterns, security, and testing. It guides PSR-12 compliance, modern PHP 8.1+ syntax, Laravel and Symfony conventions, Eloquent and Doctrine patterns, and error handling best practices.

Apache-2.0updated Jul 2026
★ 161repo stars
ruby
by miles990 · miles990/claude-software-skills

This skill teaches core Ruby patterns including classes, modules, inheritance, and mixins alongside functional programming with blocks, procs, and lambdas. It covers enumerable operations, lazy evaluation, and metaprogramming techniques like method_missing and dynamic method definition, plus error handling strategies and RSpec testing.

MITupdated Jan 2026
★ 19repo stars

More skills php-development (Apache-2.0) · Php Modernization (NOASSERTION) · cpp (MIT)

Tags
type-safetymodern-syntaxbackend-architecturedesign-patternsframework-agnosticobject-compositionfunctional-programmingenterprise-patternsversion-8-featurescode-organization