PHP code example of techarea / phuzzy

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

    

techarea / phuzzy example snippets


$phuzzy = new Techarea\Phuzzy\Phuzzy;

$phuzzy->setInputNames(['var1', 'var2']);

$phuzzy->setOutputNames(['var1', 'var2']);

$phuzzy->addMember('variabel', 'himpunan',  'titik_awal', 'titik_tengah', 'titik_akhir', 'tipe_himpunan');

$phuzzy->addRule('IF variabel.himpunan AND variabel.himpunan THEN variabel.himpunan');

$phuzzy->setRealInput('variabel', 'nilai');

$result = $phuzzy->Execute();