Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: json-encode.xml
- ===================================================================
- --- json-encode.xml (revision 320527)
- +++ json-encode.xml (working copy)
- @@ -5,26 +5,32 @@
- <refname>json_encode</refname>
- <refpurpose>Returns the JSON representation of a value</refpurpose>
- </refnamediv>
- -
- +
- <refsect1 role="description">
- &reftitle.description;
- <methodsynopsis>
- <type>string</type><methodname>json_encode</methodname>
- - <methodparam><type>mixed</type><parameter>value</parameter></methodparam>
- - <methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer>0</initializer></methodparam>
- + <methodparam>
- + <type>mixed</type><parameter>value</parameter>
- + </methodparam>
- + <methodparam choice="opt">
- + <type>int</type><parameter>options</parameter><initializer>0</initializer>
- + </methodparam>
- </methodsynopsis>
- <para>
- Returns a string containing the JSON representation of
- <parameter>value</parameter>.
- </para>
- </refsect1>
- -
- +
- <refsect1 role="parameters">
- &reftitle.parameters;
- <para>
- <variablelist>
- <varlistentry>
- - <term><parameter>value</parameter></term>
- + <term>
- + <parameter>value</parameter>
- + </term>
- <listitem>
- <para>
- The <parameter>value</parameter> being encoded. Can be any type except
- @@ -36,7 +42,9 @@
- </listitem>
- </varlistentry>
- <varlistentry>
- - <term><parameter>options</parameter></term>
- + <term>
- + <parameter>options</parameter>
- + </term>
- <listitem>
- <para>
- Bitmask consisting of <constant>JSON_HEX_QUOT</constant>,
- @@ -54,14 +62,14 @@
- </variablelist>
- </para>
- </refsect1>
- -
- +
- <refsect1 role="returnvalues">
- &reftitle.returnvalues;
- <para>
- Returns a JSON encoded <type>string</type> on success.
- </para>
- </refsect1>
- -
- +
- <refsect1 role="changelog">
- &reftitle.changelog;
- <para>
- @@ -97,14 +105,16 @@
- </informaltable>
- </para>
- </refsect1>
- -
- +
- <refsect1 role="examples">
- &reftitle.examples;
- <para>
- <example>
- - <title>A <function>json_encode</function> example</title>
- + <title>
- + A <function>json_encode</function> example
- + </title>
- <programlisting role="php">
- -<![CDATA[
- + <![CDATA[
- <?php
- $arr = array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5);
- @@ -114,16 +124,18 @@
- </programlisting>
- &example.outputs;
- <screen>
- -<![CDATA[
- + <![CDATA[
- {"a":1,"b":2,"c":3,"d":4,"e":5}
- ]]>
- </screen>
- </example>
- -
- +
- <example>
- - <title>A <function>json_encode</function> example showing all the options in action</title>
- + <title>
- + A <function>json_encode</function> example showing all the options in action
- + </title>
- <programlisting role="php">
- -<![CDATA[
- + <![CDATA[
- <?php
- $a = array('<foo>',"'bar'",'"baz"','&blong&', "\xc3\xa9");
- @@ -154,7 +166,7 @@
- </programlisting>
- &example.outputs;
- <screen>
- -<![CDATA[
- + <![CDATA[
- Normal: ["<foo>","'bar'","\"baz\"","&blong&","\u00e9"]
- Tags: ["\u003Cfoo\u003E","'bar'","\"baz\"","&blong&","\u00e9"]
- Apos: ["<foo>","\u0027bar\u0027","\"baz\"","&blong&","\u00e9"]
- @@ -177,7 +189,7 @@
- <example>
- <title>Sequential versus non-sequential array example</title>
- <programlisting role="php">
- -<![CDATA[
- + <![CDATA[
- <?php
- echo "Sequential array".PHP_EOL;
- $sequential = array("foo", "bar", "baz", "blong");
- @@ -204,7 +216,7 @@
- </programlisting>
- &example.outputs;
- <screen>
- -<![CDATA[
- + <![CDATA[
- Sequential array
- array(4) {
- [0]=>
- @@ -246,7 +258,7 @@
- </example>
- </para>
- </refsect1>
- -
- +
- <refsect1 role="notes">
- &reftitle.notes;
- <note>
- @@ -263,13 +275,17 @@
- </para>
- </note>
- </refsect1>
- -
- +
- <refsect1 role="seealso">
- &reftitle.seealso;
- <para>
- <simplelist>
- - <member><function>json_decode</function></member>
- - <member><function>json_last_error</function></member>
- + <member>
- + <function>json_decode</function>
- + </member>
- + <member>
- + <function>json_last_error</function>
- + </member>
- </simplelist>
- </para>
- </refsect1>
Add Comment
Please, Sign In to add comment