await()
function job() {
return "This is my job";
}
function testSync() {
var_dump("Hello World");
}
function testAsync() {
new Async(function () {
$result = Async::await(job());
var_dump($result);
});
}
testAsync();
testSync();Hello World
This is my jobLast updated