#19691 [Fbk->Opn]: mb_ereg_match is broken, does not return FALSE

From: Date: Tue, 01 Oct 2002 18:29:17 +0000
Subject: #19691 [Fbk->Opn]: mb_ereg_match is broken, does not return FALSE
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-21016@lists.php.net to get a copy of this message
ID: 19691 User updated by: jc@mega-bucks.co.jp Reported By: jc@mega-bucks.co.jp -Status: Feedback +Status: Open Bug Type: mbstring related Operating System: Red Hat Linux 7.2 PHP Version: 4.2.3 New Comment: Sorry! Bogus bug ... I had quotes around my whole echo statement as you pointed out .... really sorry. Previous Comments: ------------------------------------------------------------------------ [2002-10-01 13:02:25] moriyoshi@php.net I think you may have meant with the line "echo NO MATCH <BR>" for echo "NO MATCH<BR>"; But I can not reproduce the problem yet. Can you give us a more accurate script to confirm the bug? Hint: var_dump( mb_ereg_match( ... ) ); will do it easier. ------------------------------------------------------------------------ [2002-10-01 10:29:35] yohgaki@php.net s/page/paste/ ------------------------------------------------------------------------ [2002-10-01 10:28:47] yohgaki@php.net Just a comment. When you submit bug. Submit with "complete" script that is possible to copy & page, then execute. It will speed up bug fix. ------------------------------------------------------------------------ [2002-10-01 09:25:32] jc@mega-bucks.co.jp Seems like mbstring function is borked in 4.2.3 :) mb_ereg_match doesn't seem to be returning a proper FALSE value when passed to a conditional statement. BUT, the return value is an empty string which *should* evaluate to flase no? Following output and code illustrate: OUTPUT: RETURN was ** a is FALSE CODE: if (mb_ereg_match("A", "X")) { echo "MATCHES <BR>"; } else { "echo NO MATCH <BR>"; } $a = mb_ereg_match("A", "X"); echo "RETURN was *$a*<BR>"; if ($a) { } else { echo "a is FALSE<BR>";} exit; ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19691&edit=1

« previous php.bugs (#21016) next »