note 82541 deleted from function.strstr by felipe
| From: | felipe@php.net | Date: | Wed, 16 Apr 2008 11:03:47 +0000 |
| Subject: | note 82541 deleted from function.strstr by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-138360@lists.php.net to get a copy of this message | ||
Note Submitter: andy at mail310 dot com
----
<?php
$email = 'name@example.com';
$domain = strstr($email, '@');
echo $domain; // prints @example.com
?>
works just fine...
BUT...
<?php
$email = 'name@example.com';
$user = strstr($email, '@', true);
echo $user; // prints name
?>
does not work...
Warning: Wrong parameter count for strstr() in C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\test.php on line 45
true or TRUE does not make any difference...
1 or 0 makes no difference as well...
this might be a BUG, but i'm not so sure being that it simply does not work...
i'm having to work around it using substr() instead...