PHPackages                             amsify42/php-vars-data - 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. amsify42/php-vars-data

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

amsify42/php-vars-data
======================

This is a php package to deal with different data type variables

1.0(5y ago)01.9k4MITPHPPHP &gt;=7.0.0CI failing

Since Nov 22Pushed 5y ago1 watchersCompare

[ Source](https://github.com/amsify42/php-vars-data)[ Packagist](https://packagist.org/packages/amsify42/php-vars-data)[ RSS](/packages/amsify42-php-vars-data/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (2)Used By (4)

PHP Variables Data
==================

[](#php-variables-data)

This is a php package to deal with different data type variables.

### Installation

[](#installation)

```
$ composer require amsify42/php-vars-data

```

Table of Contents
-----------------

[](#table-of-contents)

1. [Evaluate](#1-evaluate)
2. [Array Simple](#2-array-simple)

### 1. Evaluate

[](#1-evaluate)

This is a simple class `Amsify42\PHPVarsData\Data\Evaluate` which converts string to its actual evaluated value and convert actual value to its evaluated string.

```
use Amsify42\PHPVarsData\Data\Evaluate;
```

To convert string to actual evaluated value

```
Evaluate::toValue('true');
Evaluate::toValue('false');
Evaluate::toValue('null');
Evaluate::toValue('42');
Evaluate::toValue('4.2');
Evaluate::toValue('Amsify');
```

To convert actual value to its evaluated string

```
Evaluate::toString(true);
Evaluate::toString(false);
Evaluate::toString(null);
Evaluate::toString(42);
Evaluate::toString(4.2);
```

To convert short count string value to its evaluated count

```
Evaluate::toCount('2.5K');
Evaluate::toCount('4.2M');
Evaluate::toCount('1.1B');
```

We can do the same with helper methods as well

```
evaluate_to_value('true');
evaluate_to_string(true);
evaluate_to_count('3.1k');
```

### 2. Array Simple

[](#2-array-simple)

Its a helper class to set/get any level array element easily.

```
use Amsify42\PHPVarsData\Data\ArraySimple;
```

This is how we can initialize array

```
$arraySimple = new ArraySimple([1,2,3]);
```

or

```
$arraySimple = new get_array_simple([1,2,3]);
```

With the initialized array, we can do all the things which we do with conventional array like setting/unsetting keys, iterating.

```
foreach($arraySimple as $item)
{
    echo $item;
}

$item[] = 4;
unset($item[4]);
```

Apart from doing the above, we can also set/get element value from any level like this

```
$arraySimple = get_array_simple([
            'name' => 'amsify',
            'detail' => [
                'location' => 'somewhere',
                'more_detail' => [
                    'do' => 'something',
                    'ids' => [42]
                ]
            ]
        ]);
echo $arraySimple->get('detail.location');
$arraySimple->set('detail.more_detail.do', 'nothing');
echo $arraySimple->get('detail.more_detail.do');
```

If you have noticed, we are passing key levels separated by dot.
**Note:** Make sure the element key names in array does not contain dots else results might not be as expected.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

2040d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7560182?v=4)[Amsify42](/maintainers/amsify42)[@amsify42](https://github.com/amsify42)

---

Top Contributors

[![amsify42](https://avatars.githubusercontent.com/u/7560182?v=4)](https://github.com/amsify42 "amsify42 (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/amsify42-php-vars-data/health.svg)

```
[![Health](https://phpackages.com/badges/amsify42-php-vars-data/health.svg)](https://phpackages.com/packages/amsify42-php-vars-data)
```

###  Alternatives

[inovector/mixpost

Self-hosted social media management software.

3.3k5.7k2](/packages/inovector-mixpost)[mmucklo/inflect

inflect - a memoizing inflector for php

4024.1M14](/packages/mmucklo-inflect)[producer/producer

Tools for releasing library packages; supports Git, Mercurial, Github, Gitlab, and Bitbucket.

10419.2k3](/packages/producer-producer)

PHPackages © 2026

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