ID: 29712
Updated by: [EMAIL PROTECTED]
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