ID:               42834
 Comment by:       judas dot iscariote at gmail dot com
 Reported By:      calvink at conceptualnetworking dot com
 Status:           Open
 Bug Type:         *General Issues
 Operating System: Linux
 PHP Version:      5.2.4
 New Comment:

6.0.0    Added the before_needle parameter

so, the error is expected , parameter only present in PHP6 (CVS HEAD
atm)


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

[2007-10-03 04:31:56] calvink at conceptualnetworking dot com

Description:
------------
strstr() does not handle the third parameter appropriately for
before_needle.

This uses the example provided in the documentation for strstr.

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

Expected result:
----------------
It should print "name"

Actual result:
--------------
Nothing is displayed and I receive the error:

Warning: Wrong parameter count for strstr() in
/xxx/xxx/x/test_read.php5

This also occured using PHP 4.4.7.


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


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

Reply via email to