- stream_wrapper_register: documentation ( source)
- stat: documentation ( source)
<?php
class StreamWrapper
{
public function stream_open($path, $mode, $options, &$opened_path)
{
return true;
}
public function stream_stat() { return stat(__FILE__); }
public function stream_read($count) { return ''; }
public function stream_eof() { return true; }
}
stream_wrapper_register('test', StreamWrapper::class);
require_once('test://foo');