PHPackages                             nsbucky/input - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. nsbucky/input

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

nsbucky/input
=============

A simple input class

1.0(12y ago)119MITPHPPHP &gt;=5.4.0

Since Mar 28Pushed 4y ago1 watchersCompare

[ Source](https://github.com/nsbucky/input)[ Packagist](https://packagist.org/packages/nsbucky/input)[ Docs](https://github.com/nsbucky/Input)[ RSS](/packages/nsbucky-input/feed)WikiDiscussions master Synced 3w ago

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

Input
=====

[](#input)

Lightweight utility package to deal with request input variables. Probably dead

PHP 5.4 + only.

Usage
-----

[](#usage)

```
$input = new \Input\Post(); // Get/Server/Cookie/Env or Your Array using \Input\Container( array );

$value = $input->value('my_post_val', 'default_value');

$bool = $input->has('var1');

$all = $input->all();

$except = $input->except('var1','var2','var3');

$only = $input->only('var1');

```

Sanitize
--------

[](#sanitize)

```
$int   = $input->asInt('var1');
$email = $input->asEmail('email_variable');

```

Validate
--------

[](#validate)

```
$bool = $input->isEmail('email_variable');
$bool = $input->isAlpha('alpha_var');
$bool = $input->notAlpha('number_var');

```

Files
-----

[](#files)

```
$files = new \Input\Files();

// get single file
// returns instance of \SplFileInfo
$file = $files->get('filename');

// returns instance of new moved file
$uploadedFile = $file->move('/path/to/dir');

// can rename files
$file->setName('newname');
$uploadedFile = $file->move('/path/to/dir'); // will be named to 'newname'

// can validate the files
$bool = $file->hasExtension('pdf');
$bool = $file->hasExtension(['jpg','png','gif']);
$bool = $file->hasMimeType('pdf');
$bool = $file->hasMimeType(['image/jpeg','image/png']);
$bool = $file->notBiggerThan('1M'); // in bytes or k/m/g/t

```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Unknown

Total

1

Last Release

4479d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/286796?v=4)[kb](/maintainers/nsbucky)[@nsbucky](https://github.com/nsbucky)

---

Top Contributors

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

---

Tags

requestinputsanitize

### Embed Badge

![Health badge](/badges/nsbucky-input/health.svg)

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

###  Alternatives

[jackocnr/intl-tel-input

A JavaScript library for entering and validating international telephone numbers

8.2k281.9k2](/packages/jackocnr-intl-tel-input)[waavi/sanitizer

Data sanitizer and Laravel 7 form requests with input sanitation.

433589.9k5](/packages/waavi-sanitizer)[elegantweb/sanitizer

Sanitization library for PHP and the Laravel framework.

1151.1M3](/packages/elegantweb-sanitizer)[abcaeffchen/sepa-utilities

SepaUtilities provides useful methods for validating and sanitizing inputs used in SEPA files supporting PHP &gt;= 8.1.

312.1M3](/packages/abcaeffchen-sepa-utilities)[arondeparon/laravel-request-sanitizer

An easy to use request sanitizer that allows you to sanitize your form data before validating it.

112160.9k4](/packages/arondeparon-laravel-request-sanitizer)[surgiie/transformer

A data transforming/formatting package for php.

12626.1k1](/packages/surgiie-transformer)

PHPackages © 2026

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