Goba
Philip Olson �rta:
I think you should revert this revert. It's not our fault that implode() has such a screwy prototype, we can only document it/them.
There are other functions with multiple prototypes as it's how we do it. Your initial change looks fully appropriate, see also min() and strtr().
Also, it should be noted that it's currently impossible
to define a prototype with the left parameter optional while the right is not, so, we cannot create this:
string implode ([string glue,] array pieces)
We should never have to either as it's invalid PHP
syntax but for whatever reason someone decided to
create this behavior with implode(). Your change both documented the new optional glue AND the current/old behavior of implode() accepting the parameters in reverse order. Two birds with one
stone :)
Regards, Philip
On Fri, 6 Jun 2003, John Coggeshall wrote:
john Fri Jun 6 11:54:48 2003 EDT
Modified files: /phpdoc/en/reference/strings/functions implode.xml Log:
Following Jani's Suggestion on a more appropiate proto.
Index: phpdoc/en/reference/strings/functions/implode.xml
diff -u phpdoc/en/reference/strings/functions/implode.xml:1.6 phpdoc/en/reference/strings/functions/implode.xml:1.7
--- phpdoc/en/reference/strings/functions/implode.xml:1.6 Fri Jun 6 07:27:15 2003
+++ phpdoc/en/reference/strings/functions/implode.xml Fri Jun 6 11:54:48 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.implode">
<refnamediv>
@@ -10,20 +10,11 @@
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>implode</methodname>
- <methodparam>
+ <methodparam choice="opt">
<type>string</type><parameter>glue</parameter>
</methodparam>
<methodparam>
<type>array</type><parameter>pieces</parameter>
- </methodparam>
- </methodsynopsis>
- <methodsynopsis>
- <type>string</type><methodname>implode</methodname>
- <methodparam>
- <type>array</type><parameter>pieces</parameter>
- </methodparam>
- <methodparam choice="opt">
- <type>string</type><parameter>glue</parameter>
</methodparam>
</methodsynopsis>
<para>
-- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
-- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
