PHPackages                             pv/pv - 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. pv/pv

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

pv/pv
=====

pv : php validation

34PHP

Since Dec 24Pushed 13y ago1 watchersCompare

[ Source](https://github.com/enygma/pv)[ Packagist](https://packagist.org/packages/pv/pv)[ RSS](/packages/pv-pv/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (1)Used By (0)

pv: php objects

The pv project is an experiment in trying to make strongly-typed objects for PHP. There are currently five types of objects in the set, some which mimic PHP's current variables:

- PArray
- PBoolean
- PDate
- PObject
- PString

Each of these methods allow you to specify validation methods to check the contents of the variable. These can be run by calling the `validate` method at any time. They can also be added or removed as needed.

The variables also allow for conversion between the types (a more structured method than PHP's loose typing). When the types are converted, a "to" method is executed when the `convert` method is called.

[![Build Status](https://camo.githubusercontent.com/1c17063c38f9134614438157a0c2a1bb8bd82e1f356d856722012c451e792c02/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f656e79676d612f70762e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/enygma/pv)

Example usage:
==============

[](#example-usage)

```
