1. Go to this page and download the library: Download willvincent/splaytree 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/ */
willvincent / splaytree example snippets
use SplayTree\SplayTree;
// Default comparator (spaceship operator)
$tree = new SplayTree();
// Custom comparator for integers
$tree = new SplayTree(function ($a, $b) {
return $a <=> $b;
});