PHP code example of reestyle-it / examiner
1. Go to this page and download the library: Download reestyle-it/examiner 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/ */
reestyle-it / examiner example snippets
$bool = true;
examine($bool)->whenBoolean(
fn () => true, // True block
fn () => false // False block
);
$bool = true;
examine($bool)->isTrue(); // true
examine($bool)->isFalse(); // false (duh)
examine($bool)->isEmpty(); // MethodNotFoundException
examine($bool)->ignoreType()->isEmpty(); // null
examine(1)->isInt(); // true
examine(1)->isFloat(); // false
examine(1.0)->isFloat(); // true
examine(1.0)->isInt(); // false
examine(1)->isTrue(); // false
examine(1)->couldBeTrue(); // true
examine(1.0)->whenFloat(fn () => 13.45);