ID:               44010
 Updated by:       [EMAIL PROTECTED]
 Reported By:      diemuzi at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Strings related
 Operating System: Archlinux
 PHP Version:      5.2.5
 New Comment:

Documentation says on changelog section:
- 6.0.0   Added the before_needle parameter.

And the new parameter is optional, the doc shows it wrong.
I'll fix it.


Previous Comments:
------------------------------------------------------------------------

[2008-02-01 08:30:05] rabbi at naglfar dot hu

Until then use this:
$user = substr ($email, 0, strpos ($email, "@"));

------------------------------------------------------------------------

[2008-02-01 08:23:18] rabbi at naglfar dot hu

Or it's will be added in the 6.0.0 version...

------------------------------------------------------------------------

[2008-02-01 01:52:15] diemuzi at gmail dot com

Description:
------------
Using these two functions strstr() and stristr().

The bug occurs only while using "true" when cutting characters from a
string to return the value before the cut.

Reproduce code:
---------------
$email  = '[EMAIL PROTECTED]';
$domain = strstr($email, '@', true);
echo $domain;

Expected result:
----------------
name

Actual result:
--------------
Warning: Wrong parameter count for strstr()


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=44010&edit=1

Reply via email to