#29712 [Opn->Ana]: ereg() does not return TRUE

From: Date: Mon, 16 Aug 2004 22:12:58 +0000
Subject: #29712 [Opn->Ana]: ereg() does not return TRUE
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969363231@lists.php.net to get a copy of this message
ID: 29712 Updated by: iliaa@php.net Reported By: liit at geeksbynature dot dk -Status: Open +Status: Analyzed -Bug Type: *Regular Expressions +Bug Type: Documentation problem Operating System: Gentoo Linux PHP Version: 4.3.8 New Comment: ereg() returns the length of the matched string on success, the documentation is wrong. Previous Comments: ------------------------------------------------------------------------ [2004-08-16 20:57:24] liit at geeksbynature dot dk Description: ------------ The function ereg() either returns (boolean)FALSE or (int)1, and not (boolean)FALSE or (boolean)TRUE Reproduce code: --------------- echo gettype(ereg("foo","foo")); echo gettype(ereg("foo","bar")); Expected result: ---------------- boolean boolean Actual result: -------------- integer boolean ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29712&edit=1

« previous php.doc (#969363231) next »