PHP Package: myclabs/php-enum

PHP Enum library for defining and using enumeration classes with ease and efficiency, simplifying data handling and improving code readability.

Current Version: 1.8.5
Last Updated: 2025-01-14
PHP Requirement: ^7.3 || ^8.0
Dependencies: None

Package Description

The myclabs/php-enum library offers a powerful solution for developers to work with enums in PHP, allowing for type-safe structures and robust data representation. By utilizing this library, programmers can enhance code maintainability and reduce errors, ensuring a smoother development process. With features like predefined values and static methods, PHP-Enum streamlines enumeration implementation, providing a concise and effective approach to handling data in various scenarios.

📦 Show all available classes🔗 View on GitHub

Download Latest Version: 1.8.5

Download Download v1.8.5

Code Integration Example

Make sure to include the correct namespace and class paths for proper usage.

<?php
// Example from PHPlibraries.com

require_once 'libs/myclabs/php-enum/1.8.5/loader.php';
use MyCLabs\Enum\Enum;

$obj = new Enum();
echo '✅ Test OK: ' . get_class($obj);
?>

We aim to make using PHP packages easier without Composer. If something doesn't work, let us know — we'll fix it promptly.

Community Discussion

Ask questions, share tips, or report issues below.