php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54093 problem error process string
Submitted: 2011-02-24 17:53 UTC Modified: 2011-02-24 18:07 UTC
From: akbar6393222 at yahoo dot com Assigned:
Status: Wont fix Package: *Regular Expressions
PHP Version: 5.2.17 OS: WinXp, 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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: akbar6393222 at yahoo dot com
New email:
PHP Version: OS:

 

 [2011-02-24 17:53 UTC] akbar6393222 at yahoo dot com
Description:
------------
# php -ver
PHP 5.2.17 (cli) (built: Jan  7 2011 11:12:15)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
    with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies


echo ereg_replace("\n"," ","\0R\0e\0g\0 \0a\0s\0k\0e\0s\0");

produce nothing




Test script:
---------------
echo ereg_replace("\n"," ","\0R\0e\0g\0 \0a\0s\0k\0e\0s\0");

Expected result:
----------------
"\0R\0e\0g\0 \0a\0s\0k\0e\0s\0"

Actual result:
--------------
null

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-02-24 18:07 UTC] rasmus@php.net
-Status: Open +Status: Wont fix
 [2011-02-24 18:07 UTC] rasmus@php.net
One of the many reasons we deprecated the ereg library and thus the ereg_* 
functions. Use:

preg_replace("/\n/"," ","\0R\0e\0g\0 \0a\0s\0k\0e\0s\0");
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 09:01:28 2024 UTC