PHPackages                             lovullo/inspekt - 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. [Security](/categories/security)
4. /
5. lovullo/inspekt

ActiveLibrary[Security](/categories/security)

lovullo/inspekt
===============

A PHP library that makes it easier to write secure web applications

025.9k↓12.5%PHP

Since Jan 22Pushed 7y ago4 watchersCompare

[ Source](https://github.com/lovullo/inspekt)[ Packagist](https://packagist.org/packages/lovullo/inspekt)[ RSS](/packages/lovullo-inspekt/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Inspekt
=======

[](#inspekt)

*slashbunny/inspekt*: This is my unmaintained version of Inspekt for legacy projects. You should probably not use this and instead stick to upstream.

---

*now on github!*

*see LICENSE for copyright and license info*

Ed Finkler

**Version 0.4.1****2010-01-15**

### What Is Inspekt?

[](#what-is-inspekt)

Inspekt is a comprehensive filtering and validation library for PHP.

Initial development of Inspekt was funded by OWASP's Spring of Code 2007.

### How Do I Use Inspekt?

[](#how-do-i-use-inspekt)

Check the user docs at [http://funkatron.com/inspekt/user\_docs](http://funkatron.com/inspekt/user_docs) or the API docs at [http://funkatron.com/inspekt/api\_docs](http://funkatron.com/inspekt/api_docs)

### How Do I Run Tests

[](#how-do-i-run-tests)

Install PHPUnit, cd to the root dir of Inspekt, and type

> phpunit InspektTest

### How Can I Contribute, Offer Feedback, Report Bugs, Complain, Etc.?

[](#how-can-i-contribute-offer-feedback-report-bugs-complain-etc)

Visit the Github site for Inspekt at

Changelog
---------

[](#changelog)

### 2014-04-14

[](#2014-04-14)

- Added composer.json file

### Version 0.4.1 - 2010-01-15

[](#version-041---2010-01-15)

- Inspekt\_Cage::keyExists now returns boolean again, unless second param is TRUE (then it returns the value if key exists)
- fixed a bunch of missing public/protected definitions
- renamed Inspekt\_CageTest.php to CageTest.php so phpunit would load it correctly
- wrote a couple unit tests for Inspekt\_Cage::testAlnum

### Version 0.4.0 - 2009-11-15

[](#version-040---2009-11-15)

- added new way to add cage accessor methods by extending `AccessorAbstract` and registering with cage object
- added `Inspekt_Cage::addAccessor()` and `Inspekt_SuperCage::addAccessor()`
- modified `Examples/extending.php` to demonstrate adding new accessor methods
- added `HTMLPurifier` integration capability and new cage filter `getPurifiedHTML()`
- added a library for [CodeIgniter](http://codeigniter.com) to use `Inspekt` in the standard Input object
- make `Inspekt::isArrayObject()` and `Inspekt::isArrayOrArrayObject()` public
- added `__call()` to Inspekt\_Cage so we can handle user-defined accessor methods
- added underscore to path portion of `isUri()` (Nick Ramsay)
- added a new folder for `Integration_helpers`
- commented out include for `Inspekt/Cage/Session` in `Cage.php` because it caused probs generating Cage test skeleton
- made PHPUnit `Inspekt_Cage` test skeleton
- added simple example for a wrapper that will pull from `GET` or `POST`

### Version 0.3.5 - 2009-07-18

[](#version-035---2009-07-18)

- refactored and reworked some examples; added db escaping examples
- did some work to get isInt to handle 64 bit integers better (more to do)
- fixed bug in `isOneOf` where a string pattern wasn't converted properly
- removed some incorrectly optional params for methods
- isRegex now correctly returns a boolean, not an Int
- added missing cage methods `getROT13`, `noTagsOrSpecial`, `escMySQL`, `escPgSQL`, `escPgSQLBytea`
- added many more unit tests

### Version 0.3.4 - 2009-07-18

[](#version-034---2009-07-18)

- Added `Inspekt::getROT13()`
- Added `Inspekt::escMySQL()`
- Added `Inspekt::escPgSQL()`
- Added `Inspekt::escPgSQLBytea()`
- Now arrays are only converted to `ArrayObjects` by cages; arrays passed into static filter calls are returned as arrays.
- More unit tests, and tests moved into `InspektTest.php` (removed Tests/ subdir)
- cleanup in `Inspekt_SuperCage` to fix `STRICT` notices

### Version 0.3.3 - 2009-07-18

[](#version-033---2009-07-18)

- Caged properties can now be iterated over b/c we're implementing `ArrayObject` (Matt McKeon)
- added a number of @assert tests for phpunit testing
- cleaned up function declarations so they would not raise STRICT notices
- leveraged Filter Extention in a couple filter methods; can be turned off with `Inspekt::useFilterExt()`
- added filter method Inspekt::noTagsOrSpecial() that strips tags, encodes `'"&`, and all low ascii chars (&lt; 32)
- upped recursion limit to 15
- `Inspekt::_walkArray` will now convert a plain array into an ArrayObject (should it always? Not sure)
- filter methods will now use `Inspekt::isArrayOrArrayObject()` to determine if they need to walk the array
- fixed some require\_once statements to use `dirname()` resolution so fewer path issues pop up (they showed up when using phpunit)

### Version 0.3.2 - 2009-06-22

[](#version-032---2009-06-22)

PHP5 now required, bug fixes for transposed params

### Version 0.3.1 - 2008-02-08

[](#version-031---2008-02-08)

Disables processing of `$_SESSION`

### Version 0.3.0 - 2008-01-16

[](#version-030---2008-01-16)

Final OWASP milestone release

### Version 0.1 - 2007-05-19

[](#version-01---2007-05-19)

Initial Release

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 61.1% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8a056bd075b81719c7eede21ba9315a4aa807ef8bbbb5bef8318eaa16cc9b32e?d=identicon)[lovullo](/maintainers/lovullo)

---

Top Contributors

[![funkatron](https://avatars.githubusercontent.com/u/1960?v=4)](https://github.com/funkatron "funkatron (44 commits)")[![frazjp65](https://avatars.githubusercontent.com/u/13321887?v=4)](https://github.com/frazjp65 "frazjp65 (11 commits)")[![fentie](https://avatars.githubusercontent.com/u/273815?v=4)](https://github.com/fentie "fentie (8 commits)")[![Slashbunny](https://avatars.githubusercontent.com/u/368525?v=4)](https://github.com/Slashbunny "Slashbunny (7 commits)")[![widox](https://avatars.githubusercontent.com/u/70316?v=4)](https://github.com/widox "widox (2 commits)")

### Embed Badge

![Health badge](/badges/lovullo-inspekt/health.svg)

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

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M113](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41478.1M118](/packages/robrichards-xmlseclibs)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

87117.5M63](/packages/bjeavons-zxcvbn-php)[illuminate/encryption

The Illuminate Encryption package.

9229.7M280](/packages/illuminate-encryption)[paragonie/hidden-string

Encapsulate strings in an object to hide them from stack traces

7410.6M39](/packages/paragonie-hidden-string)

PHPackages © 2026

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