PHPackages                             billyct/xixi-helpers - 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. billyct/xixi-helpers

ActiveLibrary

billyct/xixi-helpers
====================

XiXi helper functions contain Chemical etc.

0.0.5(8y ago)0252MITPHPPHP &gt;=7.0.0CI failing

Since Jan 8Pushed 6y ago1 watchersCompare

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

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

xixi-helpers
============

[](#xixi-helpers)

[![Build Status](https://camo.githubusercontent.com/952cc1a7b5853c523621c9aacacfa7c976746e83ee5165110a0a0d5fb7c501bb/68747470733a2f2f7472617669732d63692e6f72672f62696c6c7963742f786978692d68656c706572732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/billyct/xixi-helpers)

> XiXi helper functions contain Chemical etc.

Install
-------

[](#install)

```
composer require billyct/xixi-helpers

```

Usage
-----

[](#usage)

```
require_once './vendor/autoload.php';

is_cas('50-00-0');
// => true

is_ec('254-559-2');
// => true
```

API
---

[](#api)

### reg\_cas()

[](#reg_cas)

reg for CAS numbers

### reg\_ec()

[](#reg_ec)

reg for EC numbers

### is\_cas($value)

[](#is_casvalue)

check `$value` is CAS number

### is\_ec($value)

[](#is_ecvalue)

check `$value` is EC number

### month\_abbreviation\_en($date)

[](#month_abbreviation_endate)

convert date('M') to the right month abbreviation

### is\_none($value)

[](#is_nonevalue)

check `$value` is safe substance c-l-inventories

### is\_no\_data\_available($value)

[](#is_no_data_availablevalue)

check `$value` is no data available, is same as is\_null

### is\_hazard($value)

[](#is_hazardvalue)

not is\_none and not is\_no\_data\_available

### range\_split($value)

[](#range_splitvalue)

split range string, '12 - 90%' get \['12', '90%'\]

### str\_to\_float($value)

[](#str_to_floatvalue)

convert string to float, it support negative number, for example: '-9.8%' get -9.8

### is\_dangerous\_ph($pH)

[](#is_dangerous_phph)

check the pH value is dangerous pH

### rate($from, $to)

[](#ratefrom-to)

get the currency rate from fixer.io, example: rate('EUR', 'CNY')

### is\_wechat\_browser($request)

[](#is_wechat_browserrequest)

check the Illuminate\\Http\\Request object is from wechat browser.

License
-------

[](#license)

MIT © [billyct](https://xixisys.com)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

Every ~36 days

Total

4

Last Release

2935d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/828f1e910ac69070ecb5ec6387ebc2c1564ac2234c2a6a5e1eb9f3a12dd581fc?d=identicon)[billyct](/maintainers/billyct)

---

Top Contributors

[![billyct](https://avatars.githubusercontent.com/u/1612364?v=4)](https://github.com/billyct "billyct (22 commits)")

---

Tags

abbreviationchemicalxixi

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/billyct-xixi-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/billyct-xixi-helpers/health.svg)](https://phpackages.com/packages/billyct-xixi-helpers)
```

PHPackages © 2026

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