{"enrichment":{"faq":[{"a":"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.","q":"What does PHP help with regarding coding conventions and best practices?"},{"a":"PHP teaches strict typing by declaring `declare(strict_types=1);` at the top of your files. This enforces type coercion rules, requiring function parameters and return types to match exactly. PHP covers type declarations for scalars, union types, intersection types, and nullable types to catch errors early and improve code clarity.","q":"How do I write PHP with strict types enabled?"},{"a":"PHP covers PHP 8.5+ features including readonly classes and properties, constructor promotion, property hooks, enums for type-safe constants, first-class callables, arrow functions, and match expressions. It explains the type system's variance rules, union and intersection types, and how these features reduce boilerplate while maintaining strict safety.","q":"What PHP 8.5 modern syntax and type system features does this cover?"},{"a":"PHP guides you through setting up composer.json with PSR-4 autoloading namespaces, organizing source code in src/ directories, and configuring require and require-dev dependencies. It covers best practices for project structure, version constraints, and how autoloading integrates with modern PHP tooling for clean dependency management.","q":"How should I structure a PHP project with Composer and autoloading?"},{"a":"PHP teaches PascalCase for class names, camelCase for method and variable names, and UPPER_SNAKE_CASE for constants. It emphasizes descriptive, intention-revealing names and explains interface naming conventions (often prefixed with I or suffixed with Interface) to make code self-documenting and maintainable.","q":"What naming conventions does PHP recommend for classes, methods, and variables?"},{"a":"PHP provides strategies for incrementally modernizing legacy code: adding strict type declarations, replacing switch statements with match expressions, extracting magic values into enums, using constructor promotion to simplify class initialization, and applying dependency injection patterns. It covers LSP tools for safe navigation and refactoring of complex codebases.","q":"How can I refactor legacy PHP code to modern standards?"}],"shadow_tags":["type-safety","modern-php","code-style","oop-patterns","functional-programming","static-analysis","dependency-management","immutability","error-handling"],"summary_rewrite":"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."},"files":[{"bytes":17397,"path":"plugins/php/skills/php/SKILL.md","sha256":"07f09751820b6664538b51d3f25fb42a3a2aeb474d13063e4d128a54860570d3","url":"https://skillfed.io/files/xobotyi/cc-foundry/php/cead4b80/SKILL.md"}],"id":"xobotyi/cc-foundry/php","links":{"html":"https://skillfed.io/xobotyi/cc-foundry/php","md":"https://skillfed.io/xobotyi/cc-foundry/php.md","repo":"https://github.com/xobotyi/cc-foundry"},"meta":{"agents_supported":[],"first_seen":"2026-07-28","forks":0,"language":"JavaScript","last_updated":"2026-07-10","license":"MIT","name":"php","publisher":"xobotyi","stars":18},"relations":{"similar":[{"id":"AsyrafHussin/agent-skills/php-best-practices"},{"id":"netresearch/php-modernization-skill/php-modernization"},{"id":"dirnbauer/webconsulting-skills/php-modernization"},{"id":"Pixel-Process-UG/superkit-agents/php-specialist"},{"id":"irahardianto/awesome-agv/php-idioms"},{"id":"Goldziher/ai-rulez/php-conventions"},{"id":"dirnbauer/webconsulting-skills/typo3-conformance"},{"id":"miles990/claude-software-skills/php"},{"id":"personamanagmentlayer/pcl/php-expert"},{"id":"Mindrally/skills/php-development"}]},"slug":{"owner":"xobotyi","repo":"cc-foundry","skill":"php"},"version":"cead4b80"}
