1--TEST--
2int hash_update_stream ( resource $context , resource $handle [, int $length = -1 ] );
3--CREDITS--
4marcosptf - <marcosptf@yahoo.com.br> - @phpsp - sao paulo - br
5--SKIPIF--
6<?php
7if (phpversion() < "5.3.0") {
8    die('SKIP php version so lower.');
9}
10require_once(dirname(__FILE__) . '/skip_mhash.inc'); ?>
11?>
12--FILE--
13<?php
14$fp = tmpfile();
15fwrite($fp, 'The quick brown fox jumped over the lazy dog.');
16rewind($fp);
17
18$ctx = hash_init('md5');
19hash_update_stream($ctx, $fp);
20echo hash_final($ctx);
21?>
22--EXPECT--
235c6ffbdd40d9556b73a21e63c3e0e904
24