PHP code example of dmamontov / asynctask

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

    

dmamontov / asynctask example snippets




class TestTask extends AsyncTask
{
    protected function onPreExecute()
    {
    }

    protected function doInBackground($parameters)
    {
        return $parameters;
    }

    protected function onPostExecute($result)
    {
        echo $result;
    }
}

$task = new TestTask();
$task->execute('test');