SkillAgentSearch skills...

StringStream

Stream wrapper for strings

Install / Use

/learn @dvdoug/StringStream
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

StringStream

Stream wrapper for strings. Basically, like php://temp ~~except that you can have multiple streams at once, and can pre-initialise the contents~~. This was never tested by my past self, php://temp is in fact not shared between handles and this package was never needed. Just use php://temp

Build Status Scrutinizer Code Quality Download count Download count

Usage

stream_wrapper_register('string', '\DVDoug\StringStream\StringStream');

$handle = fopen('string://foobar', 'r+');
$contents = '';
while (!feof($handle)) {
  $contents .= fread($handle, 8192);
}
fclose($handle);

License

StringStream is MIT-licensed.

View on GitHub
GitHub Stars4
CategoryDevelopment
Updated3y ago
Forks3

Languages

PHP

Security Score

70/100

Audited on Jan 28, 2023

No findings