PHPackages                             wrkflow/php-get-typed-value - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. wrkflow/php-get-typed-value

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

wrkflow/php-get-typed-value
===========================

Get typed (strict mode) values from an Array / XML with basic validation.

v0.8.4(2y ago)24.9k↓50%2[3 issues](https://github.com/wrk-flow/php-get-typed-value/issues)MITPHPPHP &gt;=8.1

Since Jun 27Pushed 2y ago1 watchersCompare

[ Source](https://github.com/wrk-flow/php-get-typed-value)[ Packagist](https://packagist.org/packages/wrkflow/php-get-typed-value)[ GitHub Sponsors](https://github.com/sponsors/pionl)[ RSS](/packages/wrkflow-php-get-typed-value/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (9)Versions (25)Used By (0)

php-get-typed-value
===================

[](#php-get-typed-value)

[![img](https://camo.githubusercontent.com/ca93034b4d57a7539be7e1d840a3ba84a75d450e60081aa65e2dd1a6aae842fb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d382d626c7565)](https://camo.githubusercontent.com/ca93034b4d57a7539be7e1d840a3ba84a75d450e60081aa65e2dd1a6aae842fb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d382d626c7565)[![php](https://camo.githubusercontent.com/02eb24493c71a89fa4fd6672475962a2c1356dec493b716327ae9f9ab5c6bbbc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312d423042334436)](https://camo.githubusercontent.com/02eb24493c71a89fa4fd6672475962a2c1356dec493b716327ae9f9ab5c6bbbc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312d423042334436)[![coverage](https://camo.githubusercontent.com/f491a5d87ff2ae7fd1efd1c46f83b331e0ff79d9700848d5616dd60250bb2a66/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d68747470733a2f2f676973742e67697468756275736572636f6e74656e742e636f6d2f70696f6e6c2f31316238383463303664613062663931313661653736336432333433386563622f7261772f636f7665726167652e6a736f6e)](https://camo.githubusercontent.com/f491a5d87ff2ae7fd1efd1c46f83b331e0ff79d9700848d5616dd60250bb2a66/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d68747470733a2f2f676973742e67697468756275736572636f6e74656e742e636f6d2f70696f6e6c2f31316238383463303664613062663931313661653736336432333433386563622f7261772f636f7665726167652e6a736f6e)

Get typed (strict mode) values from an Array / XML with basic validation.

```
composer require wrkflow/php-get-typed-value
```

Main features
-------------

[](#main-features)

- 🚀 Retrieve values from Array (JSON) / XML with correct return type with **safe dot notation** support.
- 🏆 **Makes PHPStan / IDE** happy due the type strict return types.
- 🤹‍ **Validation:** Ensures that desired value is in correct type (without additional loop validation).
- 🛠 **Transformers:** Ensures that values are in expected type.
- ⛑ Converts empty string values to null (can be disabled, see transformers).

```
use Wrkflow\GetValue\GetValue;
use Wrkflow\GetValue\DataHolders\ArrayData;

$data = new GetValue(new ArrayData([
    'address' => [
        'street' => [
            'number' => '13',
        ],
        'name' => '',
    ]
]));
$data->getInt('address.street.number') // Returns: 13 (int)
$data->getString('address.street.name') // Returns: null because value does not exists
$data->getRequiredString('address.street.name') // Returns: throws MissingValueForKeyException exception
```

Documentation
-------------

[](#documentation)

Documentation is hosted on [GitHub Pages](https://php-get-typed-value.wrk-flow.com).

Comment
-------

[](#comment)

I've created this project as part of my mission to create `work flow` tools / libraries to make my (and yours) **dev life easier and more enjoyable**.

Want more tools or want to help? Check [wrk-flow.com](https://wrk-flow.com) or [CONTRIBUTE](CONTRIBUTION.md). You can help me improve the documentation, add new tests and features. Are you junior developer? Don't be scared, get in touch and I will guide you in your first contribution.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~27 days

Recently: every ~138 days

Total

24

Last Release

782d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ad0f2a11e630f5f386cb8544d42f0c56c2b89258172dae581a33dddcc5de1d83?d=identicon)[pionl](/maintainers/pionl)

---

Top Contributors

[![pionl](https://avatars.githubusercontent.com/u/1878831?v=4)](https://github.com/pionl "pionl (44 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (2 commits)")

---

Tags

arrayphpstrict-typesstrictmodexml

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/wrkflow-php-get-typed-value/health.svg)

```
[![Health](https://phpackages.com/badges/wrkflow-php-get-typed-value/health.svg)](https://phpackages.com/packages/wrkflow-php-get-typed-value)
```

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)[jms/serializer-bundle

Allows you to easily serialize, and deserialize data of any complexity

1.8k89.3M627](/packages/jms-serializer-bundle)[hassankhan/config

Lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files

97513.5M170](/packages/hassankhan-config)[meyfa/php-svg

Read, edit, write, and render SVG files with PHP

54613.9M42](/packages/meyfa-php-svg)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
