PHP code example of crysalead / code

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

    

crysalead / code example snippets


declare(ticks = 1);

Code::run(function(){
    sleep(100);
}, 10);

// declare(ticks = 1); is optionnal when the callable is not blocking on spinning mode

Code::spin(function(){
    sleep(1);
    return false;
}, 10);