joshdifabio / value
Installs: 21
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/joshdifabio/value
Requires
- php: >=7.1
This package is auto-updated.
Last update: 2025-10-28 02:03:46 UTC
README
An interface for immutable value classes for PHP7.1+
Value objects are one of the fundamental building blocks of modern software. However, value objects in PHP lack a common interface, making it impossible to create useful generic solutions to a range of problems, especially data structures.
This package provides a simple Value interface with two methods: equals()
and hashCode(). Also provided are a number of helper functions, such as
equal(), hash() and hashValues(), which make it easy for you to implement
your own Value classes with minimal effort.
See also
AutoValue PHP: Generated immutable value classes for PHP7.1+