PHPackages                             jjin/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. jjin/helpers

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

jjin/helpers
============

A simple collection of helper functions file for day-to-day tasks PHP web developers

1.0.1.1(6y ago)01.1kMITPHP

Since Jul 30Pushed 6y ago1 watchersCompare

[ Source](https://github.com/JijinJayakumar/helpers)[ Packagist](https://packagist.org/packages/jjin/helpers)[ Docs](https://jijin.in/codewebapp)[ RSS](/packages/jjin-helpers/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/66f26cc3ef0ad6ea93327e498db2964972a664ed5597501e30032ea34654e860/68747470733a2f2f706f7365722e707567782e6f72672f6a6a696e2f68656c706572732f762f737461626c65)](https://packagist.org/packages/jjin/helpers)[![Total Downloads](https://camo.githubusercontent.com/fcef1f08931c5fe5bd0daf9f78d095f86699618306733da280bfa2f809f3fa54/68747470733a2f2f706f7365722e707567782e6f72672f6a6a696e2f68656c706572732f646f776e6c6f616473)](https://packagist.org/packages/jjin/helpers)[![Latest Unstable Version](https://camo.githubusercontent.com/f9d0a5aeee41e836b5eecc9b791e647cffaf5d30dd71878a656587d1099b307f/68747470733a2f2f706f7365722e707567782e6f72672f6a6a696e2f68656c706572732f762f756e737461626c65)](https://packagist.org/packages/jjin/helpers)[![License](https://camo.githubusercontent.com/07072d07fc841fa4d695842c5f61fccc22c4c2648b22c57f2f8fa7eb561a3655/68747470733a2f2f706f7365722e707567782e6f72672f6a6a696e2f68656c706572732f6c6963656e7365)](https://packagist.org/packages/jjin/helpers)

**String Helpers**
==================

[](#string-helpers)

**randomString($limit)**

- *generate a random string*

> eg randomString(10) //asdgRttasE

**randomProductOrderNumber($limit)**

- generate a random string,(same as randomString, except returns capitalized output)

> eg randomProductOrderNumber(5) //F5CGIJ

**trimText(string $text, int $maxLength, $trimIndicator = '...')**

- Trim text at particular length, usable at readmore texts

> trimText($text, 10, '...')

**splitName()**

Split name string into first\_name middle\_name last\_name

splitName("jhon abraham") // return array "first\_name","last\_name","middle\_name"

**generateEmailAddress()**

Generate a dummy email address

> generateEmailAddress(3,5) //

Array Helpers
=============

[](#array-helpers)

**nullRemove($array)**

- Remove null values from array

> nullRemove(array $array = \[\])

**checkIsArrayValueEmpty($array)**

- check any value empty in associate array
- returns boolean

> checkIsArrayValueEmpty($array) //retrun true/false

**arrayOrderBy(array $items, $attr, $order)**

```
orderBy([[],[],[]],'key','desc');

```

**arrayVariadicSum(...$numbers)**'

> Takes an indefinite number of integers and returns their sum

**arrayReject($items, $func)**

> Filters the collection using the given callback.

```
reject(['Apple', 'Pear', 'Kiwi', 'Banana'], function ($item) {
return strlen($item) > 4;
}); // ['Pear', 'Kiwi']

```

**arrayTake($items, $remove\_from\_beginning\_index = 1)**

> Returns an array with n elements removed from the beginning.

File Helper
===========

[](#file-helper)

**folderCheck($params)**

- Check for a folder exists, if yes return true, else create one and returns true
- > folderCheck('$file path')
- -

**fileRemove($folderpath)**

- Completely remove a file from server

> fileRemove($folderpath)

**fileUpload($key='',$folder='')**

- upload files, even support multiple file upload

> fileUpload('my\_files','uploads/user')

**JMakeThumbNail( 'sample.jpg', $fileHeight,$fileWidth, 'default.jpg')**

> As name suggests create Thumbnails of image

Time &amp; Date helper
======================

[](#time--date-helper)

**timeNow()**

- returns current timestamp

**timeAgo($time)**

- Convert time to times ago string format

> timeAgo(time in daytime)

**getDayId($week\_string)**

get week id by passing first letter of the week

Debug Helper
============

[](#debug-helper)

Useful functions to easyly debug your codes

- json\_output(array $output = \[\], bool $exit = true, int $httpStatus = 200)

Return a prettified json output

print\_j($params,false='')

- Prints array with pre codeBlock

> print\_j($array,false)

j\_log($data = null, string $file\_url = null)

- Create a Log file in server folder

> j\_log($data = null, string $file\_url = null)

> json\_output(array $output = \[\], bool $exit = true, int $httpStatus = 200)

- echo a string,(same as die function)

d\_echo(string $var, int $die = 0)

> d\_echo(string $var, int $die = 0)

true\_response(string $message = '', int $code = 200)

- Returns a status true array with passed string and code

> true\_response(string $message = '', int $code = 200)

false\_response(string $message = '', int $code = 200)

- Returns a status false array with passed string and code

> false\_response(string $message = '', int $code = 200)

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

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

Total

3

Last Release

2308d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/959a5ae4967811824ec59d1c91968df213a89d96f1be3ba506967d9e219c578a?d=identicon)[JJiN](/maintainers/JJiN)

---

Top Contributors

[![JijinJayakumar](https://avatars.githubusercontent.com/u/13283851?v=4)](https://github.com/JijinJayakumar "JijinJayakumar (11 commits)")

---

Tags

phphelpers

### Embed Badge

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

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

###  Alternatives

[transprime-research/piper

PHP Pipe method execution with values from chained method executions

174.6k2](/packages/transprime-research-piper)

PHPackages © 2026

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