After updating the web app with Instagram and twitter client id, secret and tokens,
I encountered parser and syntax error on line 1 of the following script. I suspect there is a PHP version conflict. How do I fixe this? Thanks.
function stream_for($resource = '', array $options = [])
{
if (is_scalar($resource)) {
$stream = fopen('php://temp', 'r+');
if ($resource !== '') {
fwrite($stream, $resource);
fseek($stream, 0);
}
return new Stream($stream, $options);
}