Bug #62703 [Opn]: substr() length=null

From: Date: Tue, 31 Jul 2012 14:38:15 +0000
Subject: Bug #62703 [Opn]: substr() length=null
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-172349@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=62703&edit=1 ID: 62703 Updated by: laruence@php.net Reported by: spam02 at live dot com Summary: substr() length=null Status: Open Type: Bug Package: Strings related Operating System: Linux PHP Version: 5.3.15 Block user comment: N Private report: N New Comment: yeah, null also can be considered as 0, so, this is a little confused. the fix will be easy, however fixing this might introduce bc break(not sure) Previous Comments: ------------------------------------------------------------------------ [2012-07-31 11:17:46] spam02 at live dot com Description: ------------ seems null = not empty in mb_substr()... //example $text = 'test'; mb_substr($text,-1); //result t mb_substr($text,-1,null) //result '' expected t substr($text,-1); //result t substr($text,-1, null) //result '' expected t php version 5.3.3-7+squeeze13 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=62703&edit=1

« previous php.bugs (#172349) next »