Created
July 17, 2010 20:06
-
-
Save jakubkulhan/479808 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class foo | |
{ | |
function stream_open() { return TRUE; } | |
function stream_eof() { return FALSE; } | |
function stream_read($count) | |
{ | |
var_dump($count); | |
return ""; | |
} | |
} | |
stream_wrapper_register('foo', 'foo'); | |
$handle = fopen('foo://bar', NULL); | |
fread($handle, 1); // int(8192) | |
fread($handle, 16384); // int(8192) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment