Bug->Doc #73613 [Opn]: Not warning if length == 0

From: Date: Sun, 27 Nov 2016 04:46:13 +0000
Subject: Bug->Doc #73613 [Opn]: Not warning if length == 0
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-14146@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73613&edit=1 ID: 73613 Updated by: requinix@php.net Reported by: ua dot san dot alex at gmail dot com Summary: Not warning if length == 0 Status: Open -Type: Bug +Type: Documentation Problem Package: Strings related PHP Version: 7.1.0RC6 Block user comment: N Private report: N New Comment: The documentation doesn't say the function gives warnings. Other string functions do not give warnings when $length=0. substr_count should not give warnings. But the change is not documented - not in the substr_count docs (eg, in the Changelog) or in the 7.1 migration guide's "Changed functions" list. Previous Comments: ------------------------------------------------------------------------ [2016-11-27 00:04:19] ua dot san dot alex at gmail dot com Description: ------------ Not warning if length == 0 https://3v4l.org/jcDIo Test script: --------------- <?php substr_count('haystack', 'needle', 0, 0); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73613&edit=1

« previous php.doc.bugs (#14146) next »