[PHP-BUG] Bug #80336 [NEW]: Fatal error: Uncaught ValueError: strrpos(): Argument #3 ($offset) must be con

[email protected] ("info at backups dot nl")
Newsgroups php.bugs,php.qa
Message-ID <[email protected]>
From:             info at backups dot nl
Operating system: Ubunutom 20.04
PHP version:      8.0.0RC3
Package:          Testing related
Bug Type:         Bug
Bug description: Fatal error: Uncaught ValueError: strrpos(): Argument #3 ($offset) must be con

Description:
------------
Hi

I get this fatal error in php 8.0 rc3

Fatal Uncaught ValueError: strrpos(): Argument #3 ($offset) must be
contained in argument #1

Why do i get this error on this code.  It is exactly as the php
documentation describes to use it.

$pos = strrpos($url, '.', -1);

Please advice.

Test script:
---------------
$url='https://myserver.com';
$pos = strrpos($url, '.', -1);


-- 
Edit bug report at https://bugs.php.net/bug.php?id=80336&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=80336&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=80336&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=80336&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=80336&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=80336&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=80336&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=80336&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=80336&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=80336&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=80336&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80336&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=80336&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=80336&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=80336&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=80336&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=80336&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=80336&r=mysqlcfg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.