Allow stream based access to any variable.
Stream_Var can be registered as a stream with
and allows stream based acces to variables in any scope.
Arrays are treated as directories, so it is possible to replace temporary directories and files in your application with variables.
One example use case for
Stream_Var is temporarily modifying data for
code that only uses file functions:
<?php require_once 'Stream/Var.php'; stream_wrapper_register('var', 'Stream_Var'); $GLOBALS['somefile'] = "blah blah blah\n"; echo file_get_contents('var://GLOBALS/somefile'); //outputs "blah blah blah\n" ?>
$ pear install stream_var
$ composer require pear/stream_var
- Bug tracker
- Unit test status