PHPackages                             gowork/values - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. gowork/values

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

gowork/values
=============

PHP primitive types value objects.

0.6.5(3y ago)3435.2k↓39.5%5[3 PRs](https://github.com/gowork/values/pulls)1MITPHPPHP ^8.0

Since Nov 20Pushed 2y ago3 watchersCompare

[ Source](https://github.com/gowork/values)[ Packagist](https://packagist.org/packages/gowork/values)[ RSS](/packages/gowork-values/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (37)Used By (1)

Values
======

[](#values)

*Values* is a library to wrap PHP's primitive types into clean, immutable and more user-friendly objects.

[![Build Status](https://github.com/gowork/values/workflows/tests/badge.svg)](https://packagist.org/packages/gowork/values)[![License](https://camo.githubusercontent.com/2ab3960cfa5eec4d8354b95d35ec4e6ab04af58cdb08e4346ab04662a574d2df/68747470733a2f2f706f7365722e707567782e6f72672f676f776f726b2f76616c7565732f6c6963656e7365)](https://packagist.org/packages/gowork/values)[![Latest Stable Version](https://camo.githubusercontent.com/82d636689150fb5c9a01bd98f617935bc7627d0305e8083e6b7624030d55d0a5/68747470733a2f2f706f7365722e707567782e6f72672f676f776f726b2f76616c7565732f76)](//packagist.org/packages/gowork/values)[![Maintainability](https://camo.githubusercontent.com/fe1ea80ef14be82fc9edb91861c36aa344b4915763e2eaec2ad40c3f7babd23c/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f62346664653336666164396430396363653965622f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/gowork/values/maintainability)

Installation
------------

[](#installation)

It works on PHP &gt;=8.0. This library is available on Composer/Packagist as `gowork/values`. To install it execute:

```
composer require gowork/values ^0.6
```

or manually update your `composer.json` with:

```
{
    (...)
    "require": {
        "gowork/values": "^0.6"
    }
    (...)
}
```

and run `composer install` or `composer update` afterwards. If you are not using Composer, download sources from GitHub and load them as required. However, using Composer is highly recommended.

Usage
-----

[](#usage)

Currently available implementations are:

### `ArrayValue`

[](#arrayvalue)

Object equivalent of PHP native indexed array. It contains implementation of most `array_*` functions as object method.

Example:

```
