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