PHP code example of ft / predicates

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

    

ft / predicates example snippets


$array = [null,0,1,2,3,4,5,'one','two'];

array_filter($array, 'is_positive'); // [1,2,3,4,5]
array_filter($array, is_and('is_positive', is_not('is_truthy'))); // [2,3,4,5]
array_filter($array, is_xor('is_positive', 'is_truthy')); // [2,3,4,5]

is_month_name("january") //true

putenv("lang=kr_KR");

is_month_name('february') //true
is_month_name('이월') //true