1--TEST--
2Bug #68948: feof() on temporary streams broken
3--FILE--
4<?php
5
6$testString = '0123456789';
7
8$stream = fopen("php://memory", "r+");
9fwrite($stream, $testString);
10rewind($stream);
11
12var_dump(fread($stream, 10));
13var_dump(ftell($stream));
14var_dump(feof($stream));
15
16rewind($stream);
17
18var_dump(fread($stream, 11));
19var_dump(ftell($stream));
20var_dump(feof($stream));
21
22?>
23--EXPECT--
24string(10) "0123456789"
25int(10)
26bool(false)
27string(10) "0123456789"
28int(10)
29bool(true)
30