1. Go to this page and download the library: Download slexx/callback 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/ */
slexx / callback example snippets
use Slexx\Callback\Callback;
$callback1 = new Callback('\NameSpace\ClassName::staticMethod');
$callback2 = new Callback('\NameSpace\ClassName->method');
use Slexx\Callback\Callback;
$callback1 = new Callback([$object, 'method']);
$callback2 = new Callback(function($name) {
return 'Hello, ' . $name . '!';
});