php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80289 mb_substr, 7.4.11
Submitted: 2020-10-27 17:19 UTC Modified: 2020-11-08 04:22 UTC
From: ivse at mail dot ee Assigned: cmb (profile)
Status: No Feedback Package: *General Issues
PHP Version: 7.4.11 OS: windows, xampp
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
23 - 5 = ?
Subscribe to this entry?

 
 [2020-10-27 17:19 UTC] ivse at mail dot ee
Description:
------------
Where is mb_substr function in version php 7.4.11?????

I use CodeIgniter framework and here's in many places the function. Please recover the mb_substr.

Thank you

Test script:
---------------
$val = "dfasfa";
echo strtoupper(mb_substr(trim($val), 0, 4));
Shows
Fatal error: Uncaught Error: Call to undefined function mbsubstr() in C:\xampp\htdocs\myproj\index.php:4 Stack trace: #0 {main} thrown in C:\xampp\htdocs\myproj\index.php on line 4



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-10-27 17:23 UTC] fghghghgh at fgfgfg dot com
what about read the error message?
Call to undefined function mbsubstr()

mbsubstr != mb_substr

so the output is *for sure* not from "echo strtoupper(mb_substr(trim($val), 0, 4));"
are you kidding or why do you report own typos to a bugtracker?
 [2020-10-27 17:25 UTC] fgghghgh at fgfgfg dot com
Interactive shell

php > echo mb_substr('ggg', 1, 2);
gg
php > $val = "dfasfa";
php > echo strtoupper(mb_substr(trim($val), 0, 4));
DFAS
php > exit

PHP 7.4.11 (cli) (built: Oct  5 2020 12:47:32) ( NTS )
 [2020-10-27 17:26 UTC] cmb@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

Check phpinfo() on whether the MBString extension is available.
Also check the spelling of the function, like Harald said.
 [2020-10-27 17:26 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2020-11-08 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 20:01:29 2024 UTC