PHPackages                             wujidadi/pangtshiu - 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. wujidadi/pangtshiu

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

wujidadi/pangtshiu
==================

Custom PHP helper library, named in Taiwanese Hoklo ("pang-tshiú" means "helper")

v0.6.3(1y ago)111MITPHP

Since Dec 28Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/Wujidadi/PangTshiu)[ Packagist](https://packagist.org/packages/wujidadi/pangtshiu)[ RSS](/packages/wujidadi-pangtshiu/feed)WikiDiscussions main Synced 1mo ago

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

"Pang-tshiú" Helper Library
===========================

[](#pang-tshiú-helper-library)

[![zread](https://camo.githubusercontent.com/f6c8160f12326dc46c4d4ec26a3859711b9eee28042e89f98d7a656f9cc2bb3d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f41736b5f5a726561642d5f2e7376673f7374796c653d706c617374696326636f6c6f723d303062306161266c6162656c436f6c6f723d303030303030266c6f676f3d64617461253341696d616765253246737667253242786d6c25334262617365363425324350484e325a79423361575230614430694d5459694947686c6157646f644430694d54596949485a705a58644362336739496a41674d4341784e6941784e6949675a6d6c7362443069626d39755a53496765473173626e4d39496d6830644841364c79393364336375647a4d7562334a6e4c7a49774d44417663335a6e496a344b50484268644767675a443069545451754f5459784e5459674d5334324d444178534449754d6a51784e545a444d5334344f446778494445754e6a41774d5341784c6a59774d545532494445754f4467324e6a51674d5334324d4445314e6941794c6a49304d4446574e4334354e6a4178517a45754e6a41784e5459674e53347a4d544d314e6941784c6a67344f4445674e5334324d444178494449754d6a51784e5459674e5334324d444178534451754f5459784e545a444e53347a4d5455774d6941314c6a59774d4445674e5334324d4445314e6941314c6a4d784d7a5532494455754e6a41784e5459674e4334354e6a4178566a49754d6a51774d554d314c6a59774d545532494445754f4467324e6a51674e53347a4d5455774d6941784c6a59774d4445674e4334354e6a45314e6941784c6a59774d4446614969426d615778735053496a5a6d5a6d496938253242436a78775958526f49475139496b30304c6a6b324d545532494445774c6a4d354f546c494d6934794e4445314e6b4d784c6a67344f4445674d5441754d7a6b354f5341784c6a59774d545532494445774c6a59344e6a51674d5334324d4445314e6941784d5334774d7a6b35566a457a4c6a63314f546c444d5334324d4445314e6941784e4334784d544d30494445754f4467344d5341784e43347a4f546b35494449754d6a51784e5459674d5451754d7a6b354f5567304c6a6b324d545532517a55754d7a45314d4449674d5451754d7a6b354f5341314c6a59774d545532494445304c6a45784d7a51674e5334324d4445314e6941784d7934334e546b35566a45784c6a417a4f546c444e5334324d4445314e6941784d4334324f445930494455754d7a45314d4449674d5441754d7a6b354f5341304c6a6b324d545532494445774c6a4d354f546c614969426d615778735053496a5a6d5a6d496938253242436a78775958526f49475139496b30784d7934334e546730494445754e6a41774d5567784d5334774d7a6730517a45774c6a59344e5341784c6a59774d4445674d5441754d7a6b344e4341784c6a67344e6a5930494445774c6a4d354f4451674d6934794e444178566a51754f5459774d554d784d43347a4f546730494455754d7a457a4e5459674d5441754e6a6731494455754e6a41774d5341784d5334774d7a6730494455754e6a41774d5567784d7934334e546730517a45304c6a45784d546b674e5334324d444178494445304c6a4d354f4451674e53347a4d544d314e6941784e43347a4f546730494451754f5459774d5659794c6a49304d4446444d5451754d7a6b344e4341784c6a67344e6a5930494445304c6a45784d546b674d5334324d4441784944457a4c6a63314f4451674d5334324d444178576949675a6d6c736244306949325a6d5a69497650676f38634746306143426b50534a4e4e4341784d6b77784d694130544451674d544a614969426d615778735053496a5a6d5a6d496938253242436a78775958526f49475139496b303049444579544445794944516949484e30636d39725a54306949325a6d5a694967633352796232746c4c5864705a48526f505349784c6a556949484e30636d39725a5331736157356c5932467750534a79623356755a43497650676f384c334e325a7a344b266c6f676f436f6c6f723d666666666666)](https://zread.ai/Wujidadi/PangTshiu)

A simple library containing a set of PHP helper methods, constants, and classes.

Setup and Command-Line Testing for Local Development
----------------------------------------------------

[](#setup-and-command-line-testing-for-local-development)

```
composer i
cp .rc.example .rc
cp .test.example .test
source .rc
```

Now, you can type devt in the terminal to run a simple local command-line test with Symfony-style output:

```
true # the result of Date::isLeapYear(2024);
```

The "Pang-tshiú"s
-----------------

[](#the-pang-tshiús)

### Base62: handling Base62 numbers

[](#base62-handling-base62-numbers)

#### Base62::string

[](#base62string)

Generates a random Base62 string with variable length controlled by the parameter.

#### Base62::decToBase62

[](#base62dectobase62)

Converts a decimal number to a Base62 number string.

#### Base62::Base62ToDec

[](#base62base62todec)

Converts a Base62 number string to a decimal number string.

### Base64: built on PHP's base64 functions, adding features and encapsulation

[](#base64-built-on-phps-base64-functions-adding-features-and-encapsulation)

#### Base64::urlSafeEncode

[](#base64urlsafeencode)

Encodes the input string to a URL-safe Base64 format.

#### Base64::urlSafeDecode

[](#base64urlsafedecode)

Decodes a URL-safe Base64 string back to its original value.

### Cipher: standardizes OpenSSL functions for consistency

[](#cipher-standardizes-openssl-functions-for-consistency)

#### Cipher::publicEncrypt

[](#cipherpublicencrypt)

Encrypts the input string using a public key.

#### Cipher::privateDecrypt

[](#cipherprivatedecrypt)

Decrypts the input string using a private key.

### Date: validating and parsing date-time strings

[](#date-validating-and-parsing-date-time-strings)

#### Date::ymdhis

[](#dateymdhis)

Validate a datetime string in 'Y-m-d H:i:s' format, including BCE years.

#### Date::isLeapYear

[](#dateisleapyear)

Determine if a year is a leap year.

#### Date::isLegalDate

[](#dateislegaldate)

Validate if a given date is legal.

#### Date::isLegalTime

[](#dateislegaltime)

Validate if a given time is legal.

### Email: handling email addresses

[](#email-handling-email-addresses)

#### Email::match

[](#emailmatch)

Validate the validity of an email address (as closely as possible to [RFC 5322](https://datatracker.ietf.org/doc/html/rfc5322) and [RFC 6531](https://datatracker.ietf.org/doc/html/rfc6531) standards).

### Excel: handling Excel-related conversions

[](#excel-handling-excel-related-conversions)

#### Excel::columnToNumber

[](#excelcolumntonumber)

Convert Excel column letters to a number.

#### Excel::numberToColumn

[](#excelnumbertocolumn)

Convert a number to Excel column letters.

### Guid: generating GUIDs (Globally Unique Identifiers)

[](#guid-generating-guids-globally-unique-identifiers)

#### Guid::create

[](#guidcreate)

Generates a GUID.

#### Guid::isLegal

[](#guidislegal)

Checks if a given GUID is valid.

### Json: handling JSON data

[](#json-handling-json-data)

#### Json::unescape

[](#jsonunescape)

Encode a given data into JSON format with special characters and slashes unescaped.

#### Json::prettyPrint

[](#jsonprettyprint)

Pretty print a given data into JSON format with special characters and slashes unescaped.

### PrivateKey: handling key pairs of private and public keys

[](#privatekey-handling-key-pairs-of-private-and-public-keys)

#### PrivateKey::generate

[](#privatekeygenerate)

Generates a key pair of private and public keys.

### TGuid: Utility Class for handling TGUID (Time-sequential GUID)

[](#tguid-utility-class-for-handling-tguid-time-sequential-guid)

#### TGuid::create

[](#tguidcreate)

Generate a Base62 TGUID with additional padding to meet 42 characters.
42, the Answer to the Ultimate Question of Life, The Universe, and Everything!

#### TGuid::uuid

[](#tguiduuid)

Generate a UUID by combining uniqid and a standard GUID.

#### TGuid::base62Guid

[](#tguidbase62guid)

Generate a GUID in Base62 encoding.

#### TGuid::base62TGuid

[](#tguidbase62tguid)

Generate a TGUID in Base62 encoding.

#### TGuid::tGuidToTime

[](#tguidtguidtotime)

Convert a Base62 TGUID to a UTC datetime.

#### TGuid::timeToTGuid

[](#tguidtimetotguid)

Convert a datetime string into a Base62 number string just like the first 10 characters of a TGUID.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance67

Regular maintenance activity

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 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 ~0 days

Total

11

Last Release

498d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/589c408a6f6a16713dde3745e4c35fe23fd45533b0dae49ee892c534c0d64c8a?d=identicon)[Wujidadi](/maintainers/Wujidadi)

---

Top Contributors

[![Wujidadi](https://avatars.githubusercontent.com/u/10349431?v=4)](https://github.com/Wujidadi "Wujidadi (13 commits)")

---

Tags

helper

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/wujidadi-pangtshiu/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[bryanjhv/slim-session

Session middleware and helper for Slim framework 4.

233961.5k16](/packages/bryanjhv-slim-session)[laravelista/ekko

Framework agnostic PHP package for marking navigation items active.

278673.4k4](/packages/laravelista-ekko)[beste/json

A simple JSON helper to decode and encode JSON

4222.7M3](/packages/beste-json)[chillerlan/php-settings-container

A container class for immutable settings objects. Not a DI container.

3427.3M21](/packages/chillerlan-php-settings-container)[kartik-v/yii2-helpers

A collection of useful helper functions for Yii Framework 2.0

883.0M29](/packages/kartik-v-yii2-helpers)

PHPackages © 2026

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