1. Go to this page and download the library: Download ixnode/php-checker library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ixnode / php-checker example snippets
if (!is_array($value)) {
throw new TypeInvalidException('array', gettype($this->value));
}
$checkedArray = (new Checker($value))->checkArray();
use Ixnode\PhpChecker\Checker;
$array = (new Checker(.0))->checkFloat();
use Ixnode\PhpChecker\CheckerArray;
$array = (new CheckerArray([new Checker(123), new Checker(456), new Checker(678)])->checkClass(Checker::class);
use Ixnode\PhpChecker\CheckerClass;
$array = (new CheckerClass(new Checker(123)))->check(Checker::class);
use Ixnode\PhpChecker\CheckerJson;
$array = (new CheckerJson('{"1": 1, "2": 2, "3": 3}'))->check();
bash
composer
bash
vendor/bin/php-checker -V
bash
php-checker 0.1.0 (12-30-2022 18:08:35) - Björn Hempel <[email protected]>
bash
git clone [email protected]:ixnode/php-checker.git && cd php-checker
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.