PHP code example of daylerees / scientist

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

    

daylerees / scientist example snippets




// We need a Laboratory to do science.
$experiment = (new Scientist\Laboratory)

    // Define an experiment with a name.
    ->experiment('experiment title')
    
    // Set a callback containing our control code.
    ->control($controlCallback)
    
    // Set a callback containing our trial code.
    ->trial('trial name', $trialCallback);

// Run the experiment, receiving the control return value.
$value = $experiment->run();