Doc #73205 [Nab]: Default value for $length is shown as 0, but it should be null.

From: Date: Tue, 04 Oct 2016 09:36:40 +0000
Subject: Doc #73205 [Nab]: Default value for $length is shown as 0, but it should be null.
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-13984@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73205&edit=1 ID: 73205 User updated by: nick at nickduffell dot com dot au Reported by: nick at nickduffell dot com dot au Summary: Default value for $length is shown as 0, but it should be null. Status: Not a bug Type: Documentation Problem Package: Arrays related PHP Version: Irrelevant Assigned To: cmb Block user comment: N Private report: N New Comment: The document also states the following: If length is specified and is zero, no elements will be removed If zero was the default value the function would do nothing unless you passed a value into that parameter. When I look in my IDE however it has the following, which I believe is correct: function array_splice (array &$input, $offset, $length = null, $replacement = null) {} Previous Comments: ------------------------------------------------------------------------ [2016-09-30 08:16:19] cmb@php.net No, 0 is the default value, i.e. without passing a $length, the function behaves as if 0 was passed. ------------------------------------------------------------------------ [2016-09-30 01:15:31] nick at nickduffell dot com dot au Description: ------------ --- From manual page: http://www.php.net/function.array-splice --- Default value for $length is shown as 0, but it should be null. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73205&edit=1

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