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

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

lablnet/input
=============

PHP input package.

1.0(7y ago)71022MITPHP

Since Feb 6Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Lablnet/PHP-Input-Class)[ Packagist](https://packagist.org/packages/lablnet/input)[ RSS](/packages/lablnet-input/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

PHP input class
===============

[](#php-input-class)

This package can process the current HTTP request values.
---------------------------------------------------------

[](#this-package-can-process-the-current-http-request-values)

Requirement
-----------

[](#requirement)

1. PHP
2. Composer

Installation
------------

[](#installation)

Installing this package is very simple, first ensure you have the right PHP version and composer installed then in your terminal/(command prompt) run: `composer require lablnet/input`

Dependencies
------------

[](#dependencies)

This class use `[lablnet/http-client](https://packagist.org/packages/lablnet/http-client)` library.

Feature
-------

[](#feature)

1. Supported method get,post,put,patch,delete,files,others.
2. Clean input method(clean XSS attack/sanitize input).
3. Determine whether request is ajax or not.
4. Restore line breaks method.

Description
===========

[](#description)

It can access the HTTP request values and return them in a more convenient way to the application. Currently it can check the input values when using the GET, POST, PUT, PATCH, DELETE, FILES etc parameters, filter the parameter values, check whether request is sent by a browser using AJAX, word wrap parameter values, check whether the request is a form submission, fix parameter value line breaks.

> This class provide helpers functions for easily use of class.

Input
-----

[](#input)

You can get input by calling `input` helpers or `Input::input` method

```
require_once "../vendor/autoload.php";
$username = input('username');
```

```
//in OOP style
use Lablnet\Input;
require_once "../vendor/autoload.php";
$username = Input::input('username');
```

Escape
------

[](#escape)

You can escape input by calling `escape` helpers or `Input::escape` method

```
require_once "../vendor/autoload.php";
$username = escape(input('username'));
```

```
//in OOP style
use Lablnet\Input;
require_once "../vendor/autoload.php";
$username = Input::clean(Input::input('username'));
```

Determine whether request is ajax/xhr?
--------------------------------------

[](#determine-whether-request-is-ajaxxhr)

You can determine current request by calling `is_ajax` helpers or `Input::isAjax` method

```
require_once "../vendor/autoload.php";
if (is_ajax('name')) {
	//ajax
}
```

```
//in OOP style
use Lablnet\Input;
require_once "../vendor/autoload.php";
if (Input::isAjax('name')) {
	//ajax
}
```

Restore line breaks
-------------------

[](#restore-line-breaks)

You can restore line breaks by calling `restore_line_break` helpers or `Input::restoreLineBreaks` method

```
require_once "../vendor/autoload.php";
$comment = restore_line_break(escape(input('username')));
```

```
//in OOP style
use Lablnet\Input;
require_once "../vendor/autoload.php";
$comment = Input::restoreLineBreaks(Input::clean(Input::input('username')));
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

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

Unknown

Total

1

Last Release

2702d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/aaa321ed1bec9048a01ab2d3adcfca294a6382180fcce5fd98ddd97f52814d3c?d=identicon)[lablnet](/maintainers/lablnet)

---

Top Contributors

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

---

Tags

classfastestfreegethandlerheaderinputphppostputsafesecuredrequestphppackagefreeinputLablnet

### Embed Badge

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

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

###  Alternatives

[lablnet/encryption

PHP Encryption package.

133.0k3](/packages/lablnet-encryption)

PHPackages © 2026

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