<?php

include 'SearchGoogle.php';
$job = new SearchGoogle('cats');
$job->start();
// Wait for the job to be finished and print results
$job->join();
echo substr($job->html, 0, 20);
<?php

include 'SearchGoogle.php';
$searches = ['cats', 'dogs', 'birds'];
foreach ($searches as &$search) {
    $search = new SearchGoogle($search);
    $search->start();
}
foreach ($searches as $search) {
    $search->join();
    echo substr($search->html, 0, 20) . PHP_EOL;
}