Bug #80338 [Com]: see reported bug in another thread that was closed
| From: | rtrtrtrtrt at dfdfdfdf dot dfd | Date: | Sun, 08 Nov 2020 18:46:48 +0000 |
| Subject: | Bug #80338 [Com]: see reported bug in another thread that was closed | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-230201@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80338&edit=1
ID: 80338
Comment by: rtrtrtrtrt at dfdfdfdf dot dfd
Reported by: info at backups dot nl
Summary: see reported bug in another thread that was closed
Status: Open
Type: Bug
Package: *General Issues
Operating System: ubuntu server
PHP Version: 8.0.0RC3
Block user comment: N
Private report: N
New Comment:
it is *not true* that it is lower doing a simple empty-check versus a useless function call and it
makes no sense to call a function to tell you some position within nothing - period
Previous Comments:
------------------------------------------------------------------------
[2020-11-08 18:44:02] info at backups dot nl
Description:
------------
https://bugs.php.net/bug.php?id=80336
You closed the issue not allowing any further comments. But i am not done.
You say
> This requires a lot of code changes and makes things
> slower again as we most of the time don not know the
> value of the $haystack
this is *not* true
Then please explain to me why do I get the error when the $haystack is empty?
Now i have to check the $haystack before calling strrpos. or strpos etc etc.
Test script:
---------------
$haystack='';
$pos = strrpos($haystack, '.', -1);
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80338&edit=1