-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Different results for seek() on SplFileObject and SplTempFileObject #8563
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Appending to the test code above: if($file_01->eof()) echo "Temp file at EOF", PHP_EOL;
if($file_02->eof()) echo "Real file at EOF", PHP_EOL;
try {
echo "[",$file_01->fgets(),"]", PHP_EOL;
} catch(RuntimeException) {
echo "Failed to read from temp file", PHP_EOL;
}
try {
echo "[",$file_02->fgets(),"]", PHP_EOL;
} catch(RuntimeException) {
echo "Failed to read from real file", PHP_EOL;
} When ...But the temp file does have the same contents as the real file. |
With memory streams if we get a NULL buffer we must not instantiate an empty line
With memory streams if we get a NULL buffer we must not instantiate an empty line
With memory streams if we get a NULL buffer we must not instantiate an empty line
With memory streams if we get a NULL buffer we must not instantiate an empty line
With memory streams if we get a NULL buffer we must not instantiate an empty line
* PHP-8.0: Fix GH-8563 Different results for seek() on SplFileObject and SplTempFileObject
* PHP-8.1: Fix GH-8563 Different results for seek() on SplFileObject and SplTempFileObject
* PHP-8.0: Revert "Fix GH-8563 Different results for seek() on SplFileObject and SplTempFileObject"
* PHP-8.1: Revert "Fix GH-8563 Different results for seek() on SplFileObject and SplTempFileObject" Revert "Update FreeBSD CI image."
Description
The following code:
Resulted in this output:
But I expected this output instead:
PHP Version
PHP 8.1.6
Operating System
Windows 11
The text was updated successfully, but these errors were encountered: