php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64753 splfileobject_fwrite_variation_002.phpt output is mangled
Submitted: 2013-05-01 20:12 UTC Modified: 2021-08-16 14:17 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: mattficken@php.net Assigned: cmb (profile)
Status: Closed Package: Testing related
PHP Version: 5.3Git-2013-05-01 (snap) OS: Windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mattficken@php.net
New email:
PHP Version: OS:

 

 [2013-05-01 20:12 UTC] mattficken@php.net
Description:
------------
Output ext/spl/tests/splfileobject_fwrite_variation_002.phpt (from file_get_contents) is mangled (see actual result).

This occurs with 5.3.25rc1 and 5.3 snapshots when run on Apache-mod_php (ApacheLounge-2.4.4-vc9) with and without Opcache-7.01.

The test uses  SplFileObject::fwrite to write to a file and then reads its contents using file_get_contents for the test's expected output. The returned result is mangled (too long; extra " are added and ' ' is replaced with '_').




Test script:
---------------
ext/spl/tests/splfileobject_fwrite_variation_002.phpt

Expected result:
----------------
string(10) "test_write"

Actual result:
--------------
string(14) ""test" 'write'"


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-08-16 14:17 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2021-08-16 14:17 UTC] cmb@php.net
This test runs fine for me locally, and also on AppVeyor[1], so
apparently this issue has been fixed in the meantime.

[1] <https://ci.appveyor.com/project/php/php-src/builds/40395836/job/c7knpnto0nke25c8/artifacts>
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 15:01:34 2025 UTC