https://github.com/vikbert/istype
A simple PHP library for checking the type
https://github.com/vikbert/istype
Last synced: 9 months ago
JSON representation
A simple PHP library for checking the type
- Host: GitHub
- URL: https://github.com/vikbert/istype
- Owner: vikbert
- License: mit
- Created: 2022-01-07T19:28:20.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-08T10:46:07.000Z (about 4 years ago)
- Last Synced: 2025-06-03T15:26:17.648Z (10 months ago)
- Language: PHP
- Size: 814 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
---
## Example
```php
$isEmail = Is::email('vikbert@mail.com'); //=> true
$isEmail = Is::email('vikbert@mail'); //=> false
```
## Install
```bash
composer req vikbert/istype
```
## Test
```bash
vendor/bin/phpunit
```
## API
| usage | return | description |
|---|---|---|
| Is::email($value) | bool | check if it is an email string |
| Is::url($value) | bool | check if it is an URL string |
| Is::https($value) | bool | check if it is an URL with "https" scheme |
| Is::http($value) | bool | check if it is an URL with "http" scheme |
| Is::file($value) | bool | check if it is a valid file |
| Is::image($value) | bool | check if it is a valid image |
| Is::json($value) | bool | check if it is a valid json string |
| Is::xml($value) | bool | check if it is a valid xml string |
| Is::ip($value) | bool | check if it is a valid IP address |
## licence
MIT [@vikbert](https://vikbert.github.io/)