Bug #80623 [NEW]: substring doesn't work with §,µ and £ event on online sandbox
| From: | albu dot consult at gmail dot com | Date: | Thu, 14 Jan 2021 14:21:01 +0000 |
| Subject: | Bug #80623 [NEW]: substring doesn't work with §,µ and £ event on online sandbox | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-231559@lists.php.net to get a copy of this message | ||
From: albu dot consult at gmail dot com
Operating system: window
PHP version: 8.0.1
Package: Unknown/Other Function
Bug Type: Bug
Bug description:substring doesn't work with §,µ and £ event on online sandbox
Description:
------------
$test = '§abcd';
$test1 = substr($test,1);
echo $test1;
It should return "abcd" it doesnt but: "�abcd"
I tested it does same thing with §, µ, £ and perhaps other char I
didn't think of.
Test script:
---------------
$test = '§abcd';
$test1 = substr($test,1);
echo $test1;
Expected result:
----------------
abcd
Actual result:
--------------
�abcd
--
Edit bug report at https://bugs.php.net/bug.php?id=80623&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80623&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80623&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80623&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80623&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80623&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80623&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80623&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80623&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80623&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80623&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80623&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80623&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80623&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80623&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80623&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80623&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80623&r=mysqlcfg