ID:               44010
 Comment by:       rabbi at naglfar dot hu
 Reported By:      diemuzi at gmail dot com
 Status:           Open
 Bug Type:         Strings related
 Operating System: Archlinux
 PHP Version:      5.2.5
 New Comment:

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


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

[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