1. Go to this page and download the library: Download phpway/pubsubwp 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/ */
phpway / pubsubwp example snippets
$pubsub = new \PubSubWP\PubSub;
$pubsub->subscribe('topic.foo', function ($event) { $event['tape'] .= 'a'; });
$pubsub->subscribe('topic.foo', function ($event) { $event['tape'] .= 'b'; });