PHP code example of trismegiste / prolog

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

    

trismegiste / prolog example snippets


$machine = $this->get('prolog.wam');
$compiler = new Prolog\PrologCompiler($machine);
$code = $compiler->compile($prog);
$machine->addProgram($code);
$result = $machine->runQuery($query);