PHP code example of troublete / task
1. Go to this page and download the library: Download troublete/task 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/ */
troublete / task example snippets
function Task\{forkTask, checkSuccess};
$pid = forkTask(function () {
// do something that is only happening in the forked process
});
// continue work...
checkSuccess($pid); // to check if the process finished with great success