Guest User

Untitled

a guest
Apr 22nd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 4.20 KB | None | 0 0
  1. Index: json-encode.xml
  2. ===================================================================
  3. --- json-encode.xml (revision 320527)
  4. +++ json-encode.xml (working copy)
  5. @@ -5,26 +5,32 @@
  6.    <refname>json_encode</refname>
  7.    <refpurpose>Returns the JSON representation of a value</refpurpose>
  8.   </refnamediv>
  9. -
  10. +
  11.   <refsect1 role="description">
  12.    &reftitle.description;
  13.    <methodsynopsis>
  14.     <type>string</type><methodname>json_encode</methodname>
  15. -   <methodparam><type>mixed</type><parameter>value</parameter></methodparam>
  16. -   <methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer>0</initializer></methodparam>
  17. +   <methodparam>
  18. +    <type>mixed</type><parameter>value</parameter>
  19. +   </methodparam>
  20. +   <methodparam choice="opt">
  21. +    <type>int</type><parameter>options</parameter><initializer>0</initializer>
  22. +   </methodparam>
  23.    </methodsynopsis>
  24.    <para>
  25.     Returns a string containing the JSON representation of
  26.     <parameter>value</parameter>.
  27.    </para>
  28.   </refsect1>
  29. -
  30. +
  31.   <refsect1 role="parameters">
  32.    &reftitle.parameters;
  33.    <para>
  34.     <variablelist>
  35.      <varlistentry>
  36. -     <term><parameter>value</parameter></term>
  37. +     <term>
  38. +      <parameter>value</parameter>
  39. +     </term>
  40.       <listitem>
  41.        <para>
  42.         The <parameter>value</parameter> being encoded. Can be any type except
  43. @@ -36,7 +42,9 @@
  44.       </listitem>
  45.      </varlistentry>
  46.      <varlistentry>
  47. -     <term><parameter>options</parameter></term>
  48. +     <term>
  49. +      <parameter>options</parameter>
  50. +     </term>
  51.       <listitem>
  52.        <para>
  53.         Bitmask consisting of <constant>JSON_HEX_QUOT</constant>,
  54. @@ -54,14 +62,14 @@
  55.     </variablelist>
  56.    </para>
  57.   </refsect1>
  58. -
  59. +
  60.   <refsect1 role="returnvalues">
  61.    &reftitle.returnvalues;
  62.    <para>
  63.     Returns a JSON encoded <type>string</type> on success.
  64.    </para>
  65.   </refsect1>
  66. -
  67. +
  68.   <refsect1 role="changelog">
  69.    &reftitle.changelog;
  70.    <para>
  71. @@ -97,14 +105,16 @@
  72.     </informaltable>
  73.    </para>
  74.   </refsect1>
  75. -
  76. +
  77.   <refsect1 role="examples">
  78.    &reftitle.examples;
  79.    <para>
  80.     <example>
  81. -    <title>A <function>json_encode</function> example</title>
  82. +    <title>
  83. +     A <function>json_encode</function> example
  84. +    </title>
  85.      <programlisting role="php">
  86. -<![CDATA[
  87. +     <![CDATA[
  88.  <?php
  89.  $arr = array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5);
  90.  
  91. @@ -114,16 +124,18 @@
  92.      </programlisting>
  93.      &example.outputs;
  94.      <screen>
  95. -<![CDATA[
  96. +     <![CDATA[
  97.  {"a":1,"b":2,"c":3,"d":4,"e":5}
  98.  ]]>
  99.      </screen>
  100.     </example>
  101. -
  102. +  
  103.     <example>
  104. -    <title>A <function>json_encode</function> example showing all the options in action</title>
  105. +    <title>
  106. +     A <function>json_encode</function> example showing all the options in action
  107. +    </title>
  108.      <programlisting role="php">
  109. -<![CDATA[
  110. +     <![CDATA[
  111.  <?php
  112.  $a = array('<foo>',"'bar'",'"baz"','&blong&', "\xc3\xa9");
  113.  
  114. @@ -154,7 +166,7 @@
  115.      </programlisting>
  116.      &example.outputs;
  117.      <screen>
  118. -<![CDATA[
  119. +     <![CDATA[
  120.  Normal: ["<foo>","'bar'","\"baz\"","&blong&","\u00e9"]
  121.  Tags: ["\u003Cfoo\u003E","'bar'","\"baz\"","&blong&","\u00e9"]
  122.  Apos: ["<foo>","\u0027bar\u0027","\"baz\"","&blong&","\u00e9"]
  123. @@ -177,7 +189,7 @@
  124.     <example>
  125.      <title>Sequential versus non-sequential array example</title>
  126.      <programlisting role="php">
  127. -<![CDATA[
  128. +     <![CDATA[
  129.  <?php
  130.  echo "Sequential array".PHP_EOL;
  131.  $sequential = array("foo", "bar", "baz", "blong");
  132. @@ -204,7 +216,7 @@
  133.      </programlisting>
  134.      &example.outputs;
  135.      <screen>
  136. -<![CDATA[
  137. +     <![CDATA[
  138.  Sequential array
  139.  array(4) {
  140.    [0]=>
  141. @@ -246,7 +258,7 @@
  142.     </example>
  143.    </para>
  144.   </refsect1>
  145. -
  146. +
  147.   <refsect1 role="notes">
  148.    &reftitle.notes;
  149.    <note>
  150. @@ -263,13 +275,17 @@
  151.     </para>
  152.    </note>
  153.   </refsect1>
  154. -
  155. +
  156.   <refsect1 role="seealso">
  157.    &reftitle.seealso;
  158.    <para>
  159.     <simplelist>
  160. -    <member><function>json_decode</function></member>
  161. -    <member><function>json_last_error</function></member>
  162. +    <member>
  163. +     <function>json_decode</function>
  164. +    </member>
  165. +    <member>
  166. +     <function>json_last_error</function>
  167. +    </member>
  168.     </simplelist>
  169.    </para>
  170.   </refsect1>
Add Comment
Please, Sign In to add comment