public function call($func, $params = [])
{
$caller = ['func' => $func, 'params' => $params];
if (@fwrite($this->socket, json_encode($caller) . "\n") === false) {
throw new ExecutionException('Could not created isolated call.');
}
if (($rep = @fgets($this->socket)) === false) {
throw new ExecutionException('Could not receive returned value from isolated call.');
}
return rtrim($rep, "\n");
}