Coder
Coder

Reputation: 339

Return before call another function

Here if my function

function abc{

echo 'abc';
another_function();
return true;

}

i want it to return true and make independent to another_function() call output. dont want to wait for executing another_function()

is it possible ? if yes then how ?

Upvotes: 0

Views: 42

Answers (1)

Alexey Berezuev
Alexey Berezuev

Reputation: 793

Think, you are looking for async php libs. For example amphp, ReactPHP or Swoole

Or you can google for "coroutines in php"

Upvotes: 1

Related Questions