1. Go to this page and download the library: Download kionik/caesar 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/ */
kionik / caesar example snippets
$loop = \React\EventLoop\Factory::create();
$reader = new \Kionik\Caesar\Reader($loop);
$reader->onFind('/foo/', function (string $foo) {
echo $foo; // return 'foo'
});
$reader->onEnd(function() {
echo PHP_EOL . 'finish reading';
});
$reader->read('foo bar');
// some code...
// This can be replaced by $loop->run();
$reader->run();