PHP code example of mindplay / readable

1. Go to this page and download the library: Download mindplay/readable 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/ */

    

mindplay / readable example snippets


if (!is_int($value)) {
    throw new UnexpectedValueException("expected integer, got: " . readable::typeof($value));
} else if ($value > 100) {
    throw new RangeException("expected value up to 100, got: " . readable::value($value));
}