PHP code example of deflou / compares

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

    

deflou / compares example snippets

`
use deflou\components\compares\CompareDefault;
use deflou\components\compares\CompareVersion;

$compare = new CompareDefault(5, 6, CompareDefault::EQUAL);
echo $compare->compare(); // false

$compare = new CompareVersion('1.5', '1.6', CompareDefault::LOWER);
echo $compare->compare(); // true