The internal position of the stream is advanced by the number of bytes that were read, so that subsequent reads will continue reading from that point.
php_stream_read() returns the number of bytes that were read successfully. There is no distinction between a failed read or an end-of-file condition - use php_stream_eof() to test for an EOF.