-
Notifications
You must be signed in to change notification settings - Fork 1
Stream: isReadable Example
Terry L edited this page Jun 20, 2020
·
2 revisions
Shieldon\Psr7\Stream
Returns whether or not the stream is readable.
-
return
bool
Example:
$resource = fopen(BOOTSTRAP_DIR . '/sample/shieldon_logo.png', 'r+');
$stream = new \Shieldon\Psr7\Stream($resource);
if ($stream->isReadable()) {
echo 'File is readable';
}
// Outputs: File is readable
composer require shieldon/psr-http
Shieldon PSR HTTP implementation written by Terry L. from Taiwan.