php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14987 ereg_replace with \0
Submitted: 2002-01-10 21:04 UTC Modified: 2002-01-11 10:58 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: jimmi at sancerta dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.0.5 OS: Red Hat Linux
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: jimmi at sancerta dot com
New email:
PHP Version: OS:

 

 [2002-01-10 21:04 UTC] jimmi at sancerta dot com
I have this code:
$new = ereg_replace("123", "xy\0z", "123Hai");
The result is "xy" and not "xyzHai"

Is it a bug? because it works with preg_replace.

Thanks,
Jimmi

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-11 10:58 UTC] sander@php.net
The ereg-functions are NOT binary safe. RTM.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 10:01:28 2025 UTC