note 77515 deleted from function.mb-substr by cmb

From: Date: Wed, 18 May 2022 10:42:39 +0000
Subject: note 77515 deleted from function.mb-substr by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-218487@lists.php.net to get a copy of this message
Note Submitter: Silvan ---- Passing null as length will not make mb_substr use it's default, instead it will interpret it as 0. <?php mb_substr($str,$start,null,$encoding); //Returns '' (empty string) just like substr() ?> Instead use: <?php mb_substr($str,$start,mb_strlen($str),$encoding); ?>

« previous php.notes (#218487) next »