PHP code example of bekzatd / string_to_condition

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

    

bekzatd / string_to_condition example snippets


<?= \bekzatd\string_to_condition\Converter::if(" логическое выражение "); 

use \bekzatd\string_to_condition\Converter;

Converter::if("2>1 || 2<1"); // true
Converter::if("true || false"); //true
Converter::if("2<1 || false && 0"); // false