[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-doc-cvs
Subject:    [DOC-CVS] [doc-en] master: Fix #80975: Doc incomplete - explode
From:       Kim Hallberg via GitHub <noreply () php ! net>
Date:       2021-04-29 16:03:15
Message-ID: jUCXjjR3IloZtVpjxfsyRxjv47sFbcHVCGfMOgjNk () main ! php ! net
[Download RAW message or body]

Author: Kim Hallberg (thinkverse)
Committer: GitHub (web-flow)
Pusher: cmb69
Date: 2021-04-29T18:03:25+02:00

Commit: https://github.com/php/doc-en/commit/6b5de328b9dfb7aa391817b5cef123c80acd9979
Raw diff: https://github.com/php/doc-en/commit/6b5de328b9dfb7aa391817b5cef123c80acd9979.diff

Fix #80975: Doc incomplete - explode

* Add TypeError to changelog
* Add note about seperator values at start of end of string

Closes GH-558.

Changed paths:
  M  reference/strings/functions/explode.xml


Diff:

diff --git a/reference/strings/functions/explode.xml b/reference/strings/functions/explode.xml
index 9040e00f36..6939036935 100644
--- a/reference/strings/functions/explode.xml
+++ b/reference/strings/functions/explode.xml
@@ -84,10 +84,36 @@
    contained in <parameter>string</parameter> and a negative
    <parameter>limit</parameter> is used, then an empty <type>array</type> will be
    returned, otherwise an <type>array</type> containing
-   <parameter>string</parameter> will be returned.
+   <parameter>string</parameter> will be returned. If <parameter>separator</parameter> 
+   values appear at the start or end of <parameter>string</parameter>, said values 
+   will be added as an empty <type>array</type> value either in the first or last 
+   position of the returned <type>array</type> respectively.
   </para>
  </refsect1>
 
+ <refsect1 role="changelog">
+  &reftitle.changelog;
+  <informaltable>
+    <tgroup cols="2">
+      <thead>
+       <row>
+        <entry>&Version;</entry>
+        <entry>&Description;</entry>
+       </row>
+      </thead>
+      <tbody>
+       <row>
+        <entry>8.0.0</entry>
+        <entry>
+          <function>explode</function> will now throw <classname>TypeError</classname> 
+          when <parameter>separator</parameter> parameter is given an empty string ("").
+        </entry>
+       </row>
+      </tbody>
+    </tgroup>
+  </informaltable>
+ </refsect1>
+
  <refsect1 role="examples">
   &reftitle.examples;
   <para>

-- 
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic