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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Mon May 06 12:01:31 2024 UTC