#19430 [Opn->Bgs]: ereg stops at \0

From: Date: Mon, 16 Sep 2002 14:36:58 +0000
Subject: #19430 [Opn->Bgs]: ereg stops at \0
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-19461@lists.php.net to get a copy of this message
ID: 19430 Updated by: sander@php.net Reported By: volker@php.net -Status: Open +Status: Bogus Bug Type: *Regular Expressions Operating System: Linux 2.4.x PHP Version: 4.2.3 New Comment: As stated in the manual, the ereg_* functions are not binary safe. Use the preg_* functions. Previous Comments: ------------------------------------------------------------------------ [2002-09-16 04:39:56] volker@php.net if you have any \0 in your haystack in ereg, it stops at this point. proof: <? $string="hallo meine homepage ist www.nidura.de"; $string[10]=""; if(ereg("nidura",$string,$match)) echo "found"; else echo "not found"; ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19430&edit=1

« previous php.bugs (#19461) next »