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

 ID:                 42834
 Comment by:         michael dot t dot bryan at gmail dot com
 Reported by:        calvink at conceptualnetworking dot com
 Summary:            strstr before_needle bug
 Status:             Bogus
 Type:               Bug
 Package:            *General Issues
 Operating System:   Linux
 PHP Version:        5.2.4
 Block user comment: N
 Private report:     N

 New Comment:

This was added in php 5.3.0 according the manual as of this date. I am
running php 

5.3.3 and encounter this error.


Previous Comments:
------------------------------------------------------------------------
[2007-10-03 08:12:25] tony2...@php.net

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php



------------------------------------------------------------------------
[2007-10-03 05:11:33] judas dot iscariote at gmail dot com

6.0.0    Added the before_needle parameter



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

------------------------------------------------------------------------
[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  = 'n...@example.com';

$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/bug.php?id=42834&edit=1

Reply via email to