PHPackages                             als/utils - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. als/utils

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

als/utils
=========

Utils Component.

1.0.0(9y ago)07MITOpenEdge ABL

Since Nov 27Pushed 9y agoCompare

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

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

Als/Utils
=========

[](#alsutils)

Набор классов из пакета [Lib](http://www.parser.ru/lib/lib/).

Включает в себя:

- [Als/Utils/Lib](src/Lib.p)

```
###########################################################################
# cut trailing and leading chars $sChars (whitespaces by default) for $sText
@trim[sText;sChars]

###########################################################################
# print link to $sURI with attributes $uAttr (string or hash) if $sURI specified, otherwise just print $sLabel
@href[sURI;sLabel;uAttr]

###########################################################################
# set location header for redirecting to $sURI and prevent caching
# $.bExternal option makes redirect
@location[sURI;hParam]

###########################################################################
# check email format
@isEmail[sEmail]

###########################################################################
# print $iNum as a binary string
@dec2bin[iNum;iLength]

###########################################################################
# makes hash of tables from $tData. if $sKeyColumn is not specified 'parent_id' will be used
@createTreeHash[tData;sKeyColumn]

###########################################################################
# print number. options $.iFracLength, $.sThousandDivider and $.sDecimalDivider are available
@numberFormat[dNumber;hParam]

###########################################################################
# looks over hash elements in specified order
@foreach[hHash;sKeyName;sValueName;jCode;sSeparator;sDirection]

###########################################################################
# returns hash with parser version
@getParserVersion[]

###########################################################################
# every odd call returns $sColor1, every even - $sColor2, without parameters - reset sequence
@color[sColor1;sColor2]

###########################################################################
# creates 2-levels hash
@create2LevelHash[uData;sField1;sField2]
```

- [Als/Utils/Doc](src/Doc.p)

```
###########################################################################
# print $xDoc as string without DOCTYPE and XML declaration
@toString[xDoc]
```

- [Als/Utils/Node](src/Node.p)

```
############################################################
# print $xNode as string
@toString[xNode;sRootTag]

############################################################
# print $xNode VALUE as string: ccc => "ccc"
@valueToString[xNode;sRootTag]

############################################################
# go through all nodes in $hNodeList and execute $jCode
@foreach[hNodeList;hNodeName;sNode;sAttr;jCode;sSeparator]

############################################################
# go through all children for $xParent and execute $jCode
@foreachChild[xParent;hNodeName;sNode;sAttr;jCode;sSeparator]

############################################################
# get children of $xParent as hash
@getChildren[xParent;hNodeName]
```

- [Als/Utils/Attrs](src/Attrs.p)
- [Als/Utils/Cached](src/Cached.p)
- [Als/Utils/Convert](src/Convert.p)
- [Als/Utils/Logger](src/Logger.p)
- [Als/Utils/LibComp](src/LibComp.p)

---

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

[](#installation)

```
$ composer require als/utils
```

---

References
----------

[](#references)

- Bugs and feature request are tracked on [GitHub](https://github.com/parser3/als.utils/issues)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity63

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

Unknown

Total

1

Last Release

3456d ago

### Community

Maintainers

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

---

Top Contributors

[![leokn](https://avatars.githubusercontent.com/u/398527?v=4)](https://github.com/leokn "leokn (3 commits)")

---

Tags

alspackageparser3convertdocloggerutilsnodelibcachedalsattrs

### Embed Badge

![Health badge](/badges/als-utils/health.svg)

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

###  Alternatives

[analog/analog

Fast, flexible, easy PSR-3-compatible PHP logging package with dozens of handlers.

3451.5M24](/packages/analog-analog)[justbetter/magento2-sentry

Magento 2 Logger for Sentry

1851.5M3](/packages/justbetter-magento2-sentry)[marvinlabs/laravel-discord-logger

Logging to a discord channel in Laravel

2081.1M2](/packages/marvinlabs-laravel-discord-logger)[inpsyde/wonolog

Monolog-based logging package for WordPress.

183617.9k7](/packages/inpsyde-wonolog)[amphp/log

Non-blocking logging for PHP based on Amp, Revolt, and Monolog.

402.6M70](/packages/amphp-log)[apix/log

Minimalist, thin and fast PSR-3 compliant (multi-bucket) logger.

511.0M18](/packages/apix-log)

PHPackages © 2026

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