Bug #80338 [Opn->Dup]: see reported bug in another thread that was closed

From: Date: Sun, 08 Nov 2020 18:47:13 +0000
Subject: Bug #80338 [Opn->Dup]: see reported bug in another thread that was closed
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-230202@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 Updated by: girgias@php.net Reported by: info at backups dot nl Summary: see reported bug in another thread that was closed -Status: Open +Status: Duplicate Type: Bug Package: *General Issues Operating System: ubuntu server PHP Version: 8.0.0RC3 -Block user comment: No +Block user comment: Yes Private report: N New Comment: These changes were made for various reasons, if you are against this please raise this up on the internals mailing list as said in the previous bug report. Previous Comments: ------------------------------------------------------------------------ [2020-11-08 18:46:48] rtrtrtrtrt at dfdfdfdf dot dfd 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 ------------------------------------------------------------------------ [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

« previous php.bugs (#230202) next »