What problem does it solve?
This Skill helps developers write modern, performant PHP code, leveraging advanced language features and best practices for efficient development.
Core Features & Use Cases
- Modern PHP Syntax: Utilizes PHP 8+ features like union types, constructor property promotion, enums, match expressions, and attributes.
- Memory Efficiency: Implements generators for memory-efficient iteration over large datasets.
- Data Structures: Demonstrates the use of SPL data structures like priority queues and fixed arrays.
- Error Handling: Shows robust error handling with custom exceptions and multi-type catch blocks.
- Use Case: Refactor legacy PHP code to use modern features for improved readability and performance, or develop new features using the latest PHP capabilities.
Quick Start
Use the php skill to generate a PHP function that accepts a union type and returns an array or false.