reference/json/constants.xml
3b67c8e90cdaa14f9d1a82756dcf0000ffa8f160
...
...
@@ -1,6 +1,5 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-

4
3
<appendix xml:id="json.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5
4
&reftitle.constants;
6
5
&extension.constants;
...
...
@@ -13,79 +12,73 @@
13
12
<varlistentry xml:id="constant.json-error-none">
14
13
<term>
15
14
<constant>JSON_ERROR_NONE</constant>
16
-
(&integer;)
15
+
(<type>int</type>)
17
16
</term>
18
17
<listitem>
19
18
<simpara>
20
19
No error has occurred.
21
-
Available as of PHP 5.3.0.
22
20
</simpara>
23
21
</listitem>
24
22
</varlistentry>
25
23
<varlistentry xml:id="constant.json-error-depth">
26
24
<term>
27
25
<constant>JSON_ERROR_DEPTH</constant>
28
-
(&integer;)
26
+
(<type>int</type>)
29
27
</term>
30
28
<listitem>
31
29
<simpara>
32
30
The maximum stack depth has been exceeded.
33
-
Available as of PHP 5.3.0.
34
31
</simpara>
35
32
</listitem>
36
33
</varlistentry>
37
34
<varlistentry xml:id="constant.json-error-state-mismatch">
38
35
<term>
39
36
<constant>JSON_ERROR_STATE_MISMATCH</constant>
40
-
(&integer;)
37
+
(<type>int</type>)
41
38
</term>
42
39
<listitem>
43
40
<simpara>
44
41
Occurs with underflow or with the modes mismatch.
45
-
Available as of PHP 5.3.0.
46
42
</simpara>
47
43
</listitem>
48
44
</varlistentry>
49
45
<varlistentry xml:id="constant.json-error-ctrl-char">
50
46
<term>
51
47
<constant>JSON_ERROR_CTRL_CHAR</constant>
52
-
(&integer;)
48
+
(<type>int</type>)
53
49
</term>
54
50
<listitem>
55
51
<simpara>
56
52
Control character error, possibly incorrectly encoded.
57
-
Available as of PHP 5.3.0.
58
53
</simpara>
59
54
</listitem>
60
55
</varlistentry>
61
56
<varlistentry xml:id="constant.json-error-syntax">
62
57
<term>
63
58
<constant>JSON_ERROR_SYNTAX</constant>
64
-
(&integer;)
59
+
(<type>int</type>)
65
60
</term>
66
61
<listitem>
67
62
<simpara>
68
63
Syntax error.
69
-
Available as of PHP 5.3.0.
70
64
</simpara>
71
65
</listitem>
72
66
</varlistentry>
73
67
<varlistentry xml:id="constant.json-error-utf8">
74
68
<term>
75
69
<constant>JSON_ERROR_UTF8</constant>
76
-
(&integer;)
70
+
(<type>int</type>)
77
71
</term>
78
72
<listitem>
79
73
<simpara>
80
74
Malformed UTF-8 characters, possibly incorrectly encoded.
81
-
Available as of PHP 5.3.3.
82
75
</simpara>
83
76
</listitem>
84
77
</varlistentry>
85
78
<varlistentry xml:id="constant.json-error-recursion">
86
79
<term>
87
80
<constant>JSON_ERROR_RECURSION</constant>
88
-
(&integer;)
81
+
(<type>int</type>)
89
82
</term>
90
83
<listitem>
91
84
<simpara>
...
...
@@ -93,14 +86,13 @@
93
86
recursive references and cannot be encoded.
94
87
If the <constant>JSON_PARTIAL_OUTPUT_ON_ERROR</constant> option was
95
88
given, &null; will be encoded in the place of the recursive reference.
96
-
Available as of PHP 5.5.0.
97
89
</simpara>
98
90
</listitem>
99
91
</varlistentry>
100
92
<varlistentry xml:id="constant.json-error-inf-or-nan">
101
93
<term>
102
94
<constant>JSON_ERROR_INF_OR_NAN</constant>
103
-
(&integer;)
95
+
(<type>int</type>)
104
96
</term>
105
97
<listitem>
106
98
<simpara>
...
...
@@ -110,14 +102,13 @@
110
102
If the <constant>JSON_PARTIAL_OUTPUT_ON_ERROR</constant> option was
111
103
given, <literal>0</literal> will be encoded in the place of these
112
104
special numbers.
113
-
Available as of PHP 5.5.0.
114
105
</simpara>
115
106
</listitem>
116
107
</varlistentry>
117
108
<varlistentry xml:id="constant.json-error-unsupported-type">
118
109
<term>
119
110
<constant>JSON_ERROR_UNSUPPORTED_TYPE</constant>
120
-
(&integer;)
111
+
(<type>int</type>)
121
112
</term>
122
113
<listitem>
123
114
<simpara>
...
...
@@ -125,34 +116,31 @@
125
116
<function>json_encode</function>, such as a &resource;.
126
117
If the <constant>JSON_PARTIAL_OUTPUT_ON_ERROR</constant> option was
127
118
given, &null; will be encoded in the place of the unsupported value.
128
-
Available as of PHP 5.5.0.
129
119
</simpara>
130
120
</listitem>
131
121
</varlistentry>
132
122
<varlistentry xml:id="constant.json-error-invalid-property-name">
133
123
<term>
134
124
<constant>JSON_ERROR_INVALID_PROPERTY_NAME</constant>
135
-
(&integer;)
125
+
(<type>int</type>)
136
126
</term>
137
127
<listitem>
138
128
<simpara>
139
129
A key starting with \u0000 character was in the string passed to
140
130
<function>json_decode</function> when decoding a JSON object into a PHP
141
131
object.
142
-
Available as of PHP 7.0.0.
143
132
</simpara>
144
133
</listitem>
145
134
</varlistentry>
146
135
<varlistentry xml:id="constant.json-error-utf16">
147
136
<term>
148
137
<constant>JSON_ERROR_UTF16</constant>
149
-
(&integer;)
138
+
(<type>int</type>)
150
139
</term>
151
140
<listitem>
152
141
<simpara>
153
142
Single unpaired UTF-16 surrogate in unicode escape contained in the
154
143
JSON string passed to <function>json_decode</function>.
155
-
Available as of PHP 7.0.0.
156
144
</simpara>
157
145
</listitem>
158
146
</varlistentry>
...
...
@@ -166,26 +154,24 @@
166
154
<varlistentry xml:id="constant.json-bigint-as-string">
167
155
<term>
168
156
<constant>JSON_BIGINT_AS_STRING</constant>
169
-
(&integer;)
157
+
(<type>int</type>)
170
158
</term>
171
159
<listitem>
172
160
<simpara>
173
161
Decodes large integers as their original string value.
174
-
Available as of PHP 5.4.0.
175
162
</simpara>
176
163
</listitem>
177
164
</varlistentry>
178
165
<varlistentry xml:id="constant.json-object-as-array">
179
166
<term>
180
167
<constant>JSON_OBJECT_AS_ARRAY</constant>
181
-
(&integer;)
168
+
(<type>int</type>)
182
169
</term>
183
170
<listitem>
184
171
<simpara>
185
172
Decodes JSON objects as PHP array. This option can be added automatically
186
173
by calling <function>json_decode</function> with the second parameter
187
174
equal to &true;.
188
-
Available as of PHP 5.4.0.
189
175
</simpara>
190
176
</listitem>
191
177
</varlistentry>
...
...
@@ -199,142 +185,131 @@
199
185
<varlistentry xml:id="constant.json-hex-tag">
200
186
<term>
201
187
<constant>JSON_HEX_TAG</constant>
202
-
(&integer;)
188
+
(<type>int</type>)
203
189
</term>
204
190
<listitem>
205
191
<simpara>
206
192
All &lt; and &gt; are converted to \u003C and \u003E.
207
-
Available as of PHP 5.3.0.
208
193
</simpara>
209
194
</listitem>
210
195
</varlistentry>
211
196
<varlistentry xml:id="constant.json-hex-amp">
212
197
<term>
213
198
<constant>JSON_HEX_AMP</constant>
214
-
(&integer;)
199
+
(<type>int</type>)
215
200
</term>
216
201
<listitem>
217
202
<simpara>
218
203
All &amp; are converted to \u0026.
219
-
Available as of PHP 5.3.0.
220
204
</simpara>
221
205
</listitem>
222
206
</varlistentry>
223
207
<varlistentry xml:id="constant.json-hex-apos">
224
208
<term>
225
209
<constant>JSON_HEX_APOS</constant>
226
-
(&integer;)
210
+
(<type>int</type>)
227
211
</term>
228
212
<listitem>
229
213
<simpara>
230
214
All ' are converted to \u0027.
231
-
Available as of PHP 5.3.0.
232
215
</simpara>
233
216
</listitem>
234
217
</varlistentry>
235
218
<varlistentry xml:id="constant.json-hex-quot">
236
219
<term>
237
220
<constant>JSON_HEX_QUOT</constant>
238
-
(&integer;)
221
+
(<type>int</type>)
239
222
</term>
240
223
<listitem>
241
224
<simpara>
242
225
All " are converted to \u0022.
243
-
Available as of PHP 5.3.0.
244
226
</simpara>
245
227
</listitem>
246
228
</varlistentry>
247
229
<varlistentry xml:id="constant.json-force-object">
248
230
<term>
249
231
<constant>JSON_FORCE_OBJECT</constant>
250
-
(&integer;)
232
+
(<type>int</type>)
251
233
</term>
252
234
<listitem>
253
235
<simpara>
254
236
Outputs an object rather than an array when a non-associative array is
255
237
used. Especially useful when the recipient of the output is expecting
256
238
an object and the array is empty.
257
-
Available as of PHP 5.3.0.
258
239
</simpara>
259
240
</listitem>
260
241
</varlistentry>
261
242
<varlistentry xml:id="constant.json-numeric-check">
262
243
<term>
263
244
<constant>JSON_NUMERIC_CHECK</constant>
264
-
(&integer;)
245
+
(<type>int</type>)
265
246
</term>
266
247
<listitem>
267
248
<simpara>
268
249
Encodes numeric strings as numbers.
269
-
Available as of PHP 5.3.3.
270
250
</simpara>
271
251
</listitem>
272
252
</varlistentry>
273
253
<varlistentry xml:id="constant.json-pretty-print">
274
254
<term>
275
255
<constant>JSON_PRETTY_PRINT</constant>
276
-
(&integer;)
256
+
(<type>int</type>)
277
257
</term>
278
258
<listitem>
279
259
<simpara>
280
260
Use whitespace in returned data to format it.
281
-
Available as of PHP 5.4.0.
282
261
</simpara>
283
262
</listitem>
284
263
</varlistentry>
285
264
<varlistentry xml:id="constant.json-unescaped-slashes">
286
265
<term>
287
266
<constant>JSON_UNESCAPED_SLASHES</constant>
288
-
(&integer;)
267
+
(<type>int</type>)
289
268
</term>
290
269
<listitem>
291
270
<simpara>
292
271
Don't escape <literal>/</literal>.
293
-
Available as of PHP 5.4.0.
294
272
</simpara>
295
273
</listitem>
296
274
</varlistentry>
297
275
<varlistentry xml:id="constant.json-unescaped-unicode">
298
276
<term>
299
277
<constant>JSON_UNESCAPED_UNICODE</constant>
300
-
(&integer;)
278
+
(<type>int</type>)
301
279
</term>
302
280
<listitem>
303
281
<simpara>
304
282
Encode multibyte Unicode characters literally (default is to escape as
305
283
\uXXXX).
306
-
Available as of PHP 5.4.0.
307
284
</simpara>
308
285
</listitem>
309
286
</varlistentry>
310
287
<varlistentry xml:id="constant.json-partial-output-on-error">
311
288
<term>
312
289
<constant>JSON_PARTIAL_OUTPUT_ON_ERROR</constant>
313
-
(&integer;)
290
+
(<type>int</type>)
314
291
</term>
315
292
<listitem>
316
293
<simpara>
317
294
Substitute some unencodable values instead of failing.
318
-
Available as of PHP 5.5.0.
319
295
</simpara>
320
296
</listitem>
321
297
</varlistentry>
322
298
<varlistentry xml:id="constant.json-preserve-zero-fraction">
323
299
<term>
324
300
<constant>JSON_PRESERVE_ZERO_FRACTION</constant>
325
-
(&integer;)
301
+
(<type>int</type>)
326
302
</term>
327
303
<listitem>
328
304
<simpara>
329
305
Ensures that &float; values are always encoded as a float value.
330
-
Available as of PHP 5.6.6.
331
306
</simpara>
332
307
</listitem>
333
308
</varlistentry>
334
309
<varlistentry xml:id="constant.json-unescaped-line-terminators">
335
310
<term>
336
311
<constant>JSON_UNESCAPED_LINE_TERMINATORS</constant>
337
-
(&integer;)
312
+
(<type>int</type>)
338
313
</term>
339
314
<listitem>
340
315
<simpara>
...
...
@@ -355,7 +330,7 @@
355
330
<varlistentry xml:id="constant.json-invalid-utf8-ignore">
356
331
<term>
357
332
<constant>JSON_INVALID_UTF8_IGNORE</constant>
358
-
(&integer;)
333
+
(<type>int</type>)
359
334
</term>
360
335
<listitem>
361
336
<simpara>
...
...
@@ -367,7 +342,7 @@
367
342
<varlistentry xml:id="constant.json-invalid-utf8-substitute">
368
343
<term>
369
344
<constant>JSON_INVALID_UTF8_SUBSTITUTE</constant>
370
-
(&integer;)
345
+
(<type>int</type>)
371
346
</term>
372
347
<listitem>
373
348
<simpara>
...
...
@@ -380,7 +355,7 @@
380
355
<varlistentry xml:id="constant.json-throw-on-error">
381
356
<term>
382
357
<constant>JSON_THROW_ON_ERROR</constant>
383
-
(&integer;)
358
+
(<type>int</type>)
384
359
</term>
385
360
<listitem>
386
361
<simpara>
...
...
@@ -396,7 +371,6 @@
396
371
</variablelist>
397
372

398
373
</appendix>
399
-

400
374
<!-- Keep this comment at the end of the file
401
375
Local variables:
402
376
mode: sgml
403
377