PHP code example of fatkulnurk / is-thirteen

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

    

fatkulnurk / is-thirteen example snippets

`

use Fatkulnurk\IsThirteen\Is;

// now with elegant syntax.
echo (new Is(13))->thirteen(); //true
echo (new Is(12.8))->roughly()->thirteen(); // true
echo (new Is(6))->within(10)->of()->thirteen(); // true
echo (new Is(2007))->yearOfBirth(); // true
echo "Math";
echo (new Is(4))->plus(5)->thirteen(); // false
echo (new Is(12))->plus(1)->thirteen();  // true
echo (new Is(4))->minus(12)->thirteen(); // false
echo (new Is(14))->minus(1)->thirteen(); // true
echo (new Is(1))->times(8)->thirteen(); // false
echo (new Is(26))->divideby(2)->thirteen(); // true
`

atkulnurk\IsThirteen\Is;

if((new Is(13))->thirteen()) {
    echo "is thirteen";
}
`

atkulnurk\IsThirteen\Is;

if(is(13))->thirteen()) {
    echo "is thirteen";
}