.
An exception will be thrown if we are unable to retrieve the data.
public static fetch ( string $url, array $context = [], boolean $getHeaders = false ) : mixed | ||
$url | string | The path or URL we should fetch. |
$context | array | Extra context options. This parameter is optional. |
$getHeaders | boolean | Whether to also return response headers. Optional. |
return | mixed | array if $getHeaders is set, string otherwise |