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 1w 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 43% 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

4433d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/32774749088f18fbec2f13062d79251cb780b3fc0e1103a08eaa1786d9c3a9f2?d=identicon)[nsbucky](/maintainers/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

[elegantweb/sanitizer

Sanitization library for PHP and the Laravel framework.

115950.4k2](/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.0M2](/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.

112151.6k1](/packages/arondeparon-laravel-request-sanitizer)[surgiie/transformer

A data transforming/formatting package for php.

12724.3k1](/packages/surgiie-transformer)[aura/input

This package contains tools to describe and filter user inputs from an HTML form, including sub-forms/sub-fieldsets, fieldset collections, an interface for injecting custom filter systems, and CSRF protection. Note that this package does not include output functionality, although the "hints" provided by the Form object can be used with any presentation system to generate an HTML form.

6678.4k4](/packages/aura-input)[erlandmuchasaj/sanitize

A package to sanitize your input.

146.0k](/packages/erlandmuchasaj-sanitize)

PHPackages © 2026

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