PHPackages                             imonroe/ana - 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. imonroe/ana

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

imonroe/ana
===========

Ana is my personal library of PHP 7 compatible helper functions

1.0.5(8y ago)11921MITPHPPHP ~5.6|~7.0CI failing

Since Aug 17Pushed 8y ago1 watchersCompare

[ Source](https://github.com/imonroe/ana)[ Packagist](https://packagist.org/packages/imonroe/ana)[ Docs](https://github.com/imonroe/ana)[ RSS](/packages/imonroe-ana/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (2)Versions (6)Used By (1)

ana
===

[](#ana)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d27222381ba7ddb88ea9154a9581886a18c0ead6c9e82d87f07dc467dbc743ff/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696d6f6e726f652f616e612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/imonroe/ana)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/b59f21dfb4afe29efaa0f63c434d15a4837682cd6cf832ad83549a3179bb499b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696d6f6e726f652f616e612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/imonroe/ana)

Install
-------

[](#install)

Via Composer

```
$ composer require imonroe/ana
```

Usage
-----

[](#usage)

```
use imonroe\ana\Ana;

$formatted_date = Ana::standard_date_format(strtotime('yesterday'));

if (Ana::even_or_odd(2) == 'even'){
// do something
}

if (Ana::is_valid_link('https://www.google.com')){
// link is valid and curl-able
}

// grab a file from the web and save it to a text file.
Ana::create_file('sample.txt', Ana::quick_curl('https://www.sample.com/index.html'), true);
```

Available Methods:
------------------

[](#available-methods)

All methods are static.

- standard\_date\_format($timestamp = '')
- sql\_datetime($timestamp = '')
- google\_datetime($timestamp = '')
- is\_today($date\_string)
- sooner\_than($date\_string)
- later\_than($date\_string)
- print\_relative\_date($date)
- fatal\_handler()
- dd($var)
- array\_unique\_multi($arr)
- array\_sort\_by\_column(&amp;$arr, $col, $dir = SORT\_ASC)
- object\_to\_array($object)
- build\_tree($flat, $pidKey, $idKey = null)
- csv\_to\_array($filename='', $delimiter=',')
- plural($quantity)
- word\_limit($haystack, $ubound)
- convert\_to\_utf($input)
- plain\_text($input)
- trim\_string\_to\_length($str, $len)
- use\_a\_or\_an($text)
- even\_or\_odd($number)
- random\_number($lowbound = 1, $highbound = 100)
- random\_hex($bytes = 8)
- generateStrongPassword($length = 9, $add\_dashes = false, $available\_sets = 'luds')
- create\_nonce()
- current\_page\_url()
- get\_url\_segment($number)
- is\_valid\_link($link)
- quick\_curl($link)
- get\_ip()
- submit\_post\_request($url, $data)
- loading\_spinner()
- code\_safe\_name($string)
- cast($destination, $sourceObject)
- ask\_user($prompt)
- say($msg)
- error\_out($msg)
- create\_directory($directory\_path, $perms = 0777)
- remove\_directory($path)
- create\_file($file\_path\_and\_name, $file\_content, $overwrite = false)
- append\_file($file\_path\_and\_name, $file\_content, $overwrite = false)
- get\_url\_and\_save($fully\_qualified\_url, $filename)
- read\_file\_to\_string($filename)
- get\_directory\_list($directory\_path)
- execute($cmd)
- get\_arguments()
- replace\_line\_in\_file(String $filename='', String $line\_to\_change='', String $change\_to='')
- replace\_and\_save($oldFile, $search, $replace, $newFile = null)
- us\_states()

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Ian Monroe](https://github.com/imonroe)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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

Every ~75 days

Total

5

Last Release

2937d ago

### Community

Maintainers

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

---

Top Contributors

[![imonroe](https://avatars.githubusercontent.com/u/1263892?v=4)](https://github.com/imonroe "imonroe (31 commits)")

---

Tags

imonroeana

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/imonroe-ana/health.svg)

```
[![Health](https://phpackages.com/badges/imonroe-ana/health.svg)](https://phpackages.com/packages/imonroe-ana)
```

###  Alternatives

[popo/generator

Plain Old PHP Object (POPO) / Data Structure / Data Transfer Object (DTO) Generator. Convert YAML schema to PHP class.

2040.5k9](/packages/popo-generator)

PHPackages © 2026

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