PHP code example of richtoms / spot

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

    

richtoms / spot example snippets


$tracker = new ClosureTracker(function ($array) {
    return array_map(function ($item) {
        return $x += 1;
    }, $array);
}, [[1, 2, 3, 4]]);

// Result of the Closure.
$result = $tracker->getResult();

// List of events tracked when calling the Closure.
$result->getEvents();