1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
- <!-- EN-Revision: 8a9f4bd9d54a809d66f32d35ec60eb2b7353f76e Maintainer: mowangjuanzi Status: partial -->
2
+ <!-- EN-Revision: 8a9f4bd9d54a809d66f32d35ec60eb2b7353f76e Maintainer: mowangjuanzi Status: ready -->
3
3
<sect1 xml : id =" migration84.new-features" >
4
4
<title >新功能</title >
5
5
@@ -195,33 +195,23 @@ $object = $reflector->newLazyGhost($initializer);
195
195
</simpara >
196
196
197
197
<simpara >
198
- Added <constant >CURL_HTTP_VERSION_3</constant > and
199
- <constant >CURL_HTTP_VERSION_3ONLY</constant > constants (available
200
- since libcurl 7.66 and 7.88) as available options for
201
- <constant >CURLOPT_HTTP_VERSION</constant >.
198
+ 新增 <constant >CURL_HTTP_VERSION_3</constant > 和 <constant >CURL_HTTP_VERSION_3ONLY</constant >
199
+ 常量(自 libcurl 7.66 和 7.88 起可用)作为 <constant >CURLOPT_HTTP_VERSION</constant > 的可用选项。
202
200
</simpara >
203
201
204
202
<simpara >
205
- Added <constant >CURLOPT_PREREQFUNCTION</constant > as a cURL option that
206
- accepts a <type >callable</type > to be called after the connection is made,
207
- but before the request is sent.
208
- This callable must return either <constant >CURL_PREREQFUNC_OK</constant > or
209
- <constant >CURL_PREREQFUNC_ABORT</constant > to allow or abort the request.
203
+ 新增 <constant >CURLOPT_PREREQFUNCTION</constant > 作为 cURL 选项,该选项接受在建立连接后但在发送请求之前调用的
204
+ <type >callable</type >。此 callable 必须返回 <constant >CURL_PREREQFUNC_OK</constant > 或
205
+ <constant >CURL_PREREQFUNC_ABORT</constant > 以允许或中止请求。
210
206
</simpara >
211
207
212
208
<simpara >
213
- Added <constant >CURLOPT_SERVER_RESPONSE_TIMEOUT</constant >,
214
- which was formerly known as <constant >CURLOPT_FTP_RESPONSE_TIMEOUT</constant >.
215
- Both constants hold the same value.
209
+ 新增 CURLOPT_SERVER_RESPONSE_TIMEOUT,以前称为 <constant >CURLOPT_FTP_RESPONSE_TIMEOUT</constant >。两个常量都具有相同的值。
216
210
</simpara >
217
211
218
212
<para >
219
- Added <constant >CURLOPT_DEBUGFUNCTION</constant > as a cURL option that
220
- accepts a <type >callable</type > that gets called during the request lifetime
221
- with the <classname >CurlHandle</classname > object,
222
- an integer containing the debug message type, and a string containing the
223
- debug message.
224
- The debug message type is one of the following constants:
213
+ 新增 <constant >CURLOPT_DEBUGFUNCTION</constant > 作为 cURL 选项,该选项接受在请求生命周期内使用
214
+ <classname >CurlHandle</classname > 对象调用的 <type >callable</type >、包含调试消息类型的整数以及包含调试消息的字符串。调试消息类型是以下常量之一:
225
215
<simplelist >
226
216
<member ><constant >CURLINFO_TEXT</constant ></member >
227
217
<member ><constant >CURLINFO_HEADER_IN</constant ></member >
@@ -231,19 +221,14 @@ $object = $reflector->newLazyGhost($initializer);
231
221
<member ><constant >CURLINFO_SSL_DATA_IN</constant ></member >
232
222
<member ><constant >CURLINFO_SSL_DATA_OUT</constant ></member >
233
223
</simplelist >
234
- Once this option is set, <constant >CURLINFO_HEADER_OUT</constant >
235
- must not be set because it uses the same libcurl functionality.
224
+ 一旦设置了此选项,就不能设置 <constant >CURLINFO_HEADER_OUT</constant >,因为它使用相同的 libcurl 功能。
236
225
</para >
237
226
238
227
<simpara >
239
- The <function >curl_getinfo</function > now returns an additional
240
- <literal >posttransfer_time_us</literal > key, containing the number of
241
- microseconds from the start until the last byte is sent.
242
- When a redirect is followed, the time from each request is added together.
243
- This value can also be retrieved by passing
244
- <constant >CURLINFO_POSTTRANSFER_TIME_T</constant > to the
245
- <function >curl_getinfo</function > <parameter >option</parameter > parameter.
246
- This requires libcurl 8.10.0 or later.
228
+ <function >curl_getinfo</function > 现在返回一个额外的 <literal >posttransfer_time_us</literal >
229
+ key,其中包含从开始到发送最后一个字节的微秒数。当重定向之后,每个请求的时间都会加在一起。也可以通过将
230
+ <constant >CURLINFO_POSTTRANSFER_TIME_T</constant > 传递给 <function >curl_getinfo</function >
231
+ <parameter >option</parameter > 参数来检索此值。这需要 libcurl 8.10.0 或更高版本。
247
232
</simpara >
248
233
</sect2 >
249
234
@@ -284,50 +269,38 @@ $object = $reflector->newLazyGhost($initializer);
284
269
<title >Intl</title >
285
270
286
271
<simpara >
287
- Added the <constant >NumberFormatter::ROUND_HALFODD</constant > to
288
- complement the existing <constant >NumberFormatter::ROUND_HALFEVEN</constant >
289
- functionality.
272
+ 新增 <constant >NumberFormatter::ROUND_HALFODD</constant > 来补充现有的 <constant >NumberFormatter::ROUND_HALFEVEN</constant > 功能。
290
273
</simpara >
291
274
</sect2 >
292
275
293
276
<sect2 xml : id =" migration84.new-features.openssl" >
294
277
<title >OpenSSL</title >
295
278
296
279
<simpara >
297
- Added support for Curve25519 + Curve448 based keys.
298
- Specifically x25519, ed25519, x448 and ed448 fields are supported in
299
- <function >openssl_pkey_new</function >,
300
- <function >openssl_pkey_get_details</function >,
301
- <function >openssl_sign</function >, and
302
- <function >openssl_verify</function > were extended to support those keys.
280
+ 添加了对基于 Curve25519 + Curve448 密钥的支持。具体来说
281
+ <function >openssl_pkey_new</function >、<function >openssl_pkey_get_details</function >、<function >openssl_sign</function > 和
282
+ <function >openssl_verify</function > 中支持 x25519、ed25519、x448 和 ed448 字段,并进行了扩展以支持这些密钥。
303
283
</simpara >
304
284
305
285
<simpara >
306
- Implement PASSWORD_ARGON2 password hashing.
307
- Requires OpenSSL 3.2 and NTS build.
286
+ 实现 PASSWORD_ARGON2 密码哈希处理。需要 OpenSSL 3.2 和 NTS 版本。
308
287
</simpara >
309
288
</sect2 >
310
289
311
290
<sect2 xml : id =" migration84.new-features.pcre" >
312
291
<title >PCRE</title >
313
292
314
293
<simpara >
315
- The bundled pcre2lib has been updated to version 10.44.
316
- As a consequence, LoongArch JIT support has been added, spaces
317
- are now allowed between braces in Perl-compatible items, and
318
- variable-length lookbehind assertions are now supported.
294
+ 捆绑的 pcre2lib 已更新至 10.44 版本。因此,添加了 LoongArch JIT 支持,现在允许在与 Perl 兼容项目中的花括号之间使用空格,并且现在支持可变长度的后向断言。
319
295
</simpara >
320
296
321
297
<simpara >
322
- With pcre2lib version 10.44, the maximum length of named capture groups
323
- has changed from <literal >32</literal > to <literal >128</literal >.
298
+ 随着 pcre2lib 版本 10.44 的推出,命名捕获组的最大长度已从 <literal >32</literal > 更改为 <literal >128</literal >。
324
299
</simpara >
325
300
326
301
<simpara >
327
- Added support for the <literal >r</literal > (PCRE2_EXTRA_CASELESS_RESTRICT)
328
- modifier, as well as the <literal >(?r)</literal > mode modifier.
329
- When enabled along with the case-insensitive modifier (<literal >i</literal >),
330
- the expression locks out mixing of ASCII and non-ASCII characters.
302
+ 添加了对 <literal >r</literal >(PCRE2_EXTRA_CASELESS_RESTRICT)修饰符以及 <literal >(?r)</literal >
303
+ 模式修饰符的支持。当与不区分大小写的修饰符 (<literal >i</literal >) 一起启用时,表达式会阻止 ASCII 和非 ASCII 字符的混合。
331
304
</simpara >
332
305
</sect2 >
333
306
@@ -336,24 +309,19 @@ $object = $reflector->newLazyGhost($initializer);
336
309
337
310
<!-- RFC: https://wiki.php.net/rfc/pdo_driver_specific_subclasses -->
338
311
<simpara >
339
- Added support for driver-specific subclasses.
340
- This RFC adds subclasses for PDO in order to better support
341
- database-specific functionalities.
342
- The new classes are instantiatable either via calling the
343
- <methodname >PDO::connect</methodname > method or by instantiating an instance
344
- of the driver-specific subclass directly.
312
+ 新增对特定驱动程序子类的支持。此 RFC 添加了 PDO 的子类,以便更好地支持特定于数据库的功能。新的类可通过调用 <methodname >PDO::connect</methodname >
313
+ 方法或直接实例化特定驱动程序子类的实例来实例化。
345
314
</simpara >
346
315
347
316
<!-- RFC: https://wiki.php.net/rfc/pdo_driver_specific_parsers -->
348
317
<para >
349
- Added support for driver specific SQL parsers.
350
- The default parser supports:
318
+ 新增对特定驱动程序的 SQL 解析器的支持。默认解析器支持:
351
319
<simplelist >
352
320
<member >
353
- single and double-quoted literals, with doubling as escaping mechanism
321
+ 单引号和双引号文字,使用双引号作为转义机制
354
322
</member >
355
323
<member >
356
- two-dashes and non-nested C-style comments
324
+ 双破折号和非嵌套的 C 风格注释
357
325
</member >
358
326
</simplelist >
359
327
</para >
@@ -364,18 +332,16 @@ $object = $reflector->newLazyGhost($initializer);
364
332
365
333
<!-- RFC: https://wiki.php.net/rfc/pdo_driver_specific_parsers -->
366
334
<para >
367
- Added a custom parser supporting:
335
+ 新增自定义解析器支持:
368
336
<simplelist >
369
337
<member >
370
- single and double-quoted literals, with doubling and backslash as escaping
371
- mechanism
338
+ 单引号和双引号文字,使用双引号作为转义机制
372
339
</member >
373
340
<member >
374
- backtick literal identifiers and with doubling as escaping mechanism
341
+ 反引号文字标识符并且双写反引号作为转义机制
375
342
</member >
376
343
<member >
377
- two dashes followed by at least 1 whitespace, non-nested C-style comments,
378
- and hash-comments
344
+ 两个破折号后跟至少 1 个空格、非嵌套的 C 风格注释和哈希注释(以 # 开头的注释)
379
345
</member >
380
346
</simplelist >
381
347
</para >
@@ -386,23 +352,22 @@ $object = $reflector->newLazyGhost($initializer);
386
352
387
353
<!-- RFC: https://wiki.php.net/rfc/pdo_driver_specific_parsers -->
388
354
<para >
389
- Added a custom parser supporting:
355
+ 新增自定义解析器支持:
390
356
<simplelist >
391
357
<member >
392
- single and double-quoted literals, with doubling as escaping mechanism
358
+ 单引号和双引号文字,使用双引号作为转义机制
393
359
</member >
394
360
<member >
395
- C-style "escape" string literals ( <literal >E'string'</literal >)
361
+ C 风格“转义”字符串文字( <literal >E'string'</literal >)
396
362
</member >
397
363
<member >
398
364
dollar-quoted string literals
399
365
</member >
400
366
<member >
401
- two-dashes and C-style comments (non-nested)
367
+ 双破折号和 C 风格注释(非嵌套)
402
368
</member >
403
369
<member >
404
- support for <literal >??</literal > as escape sequence for the
405
- <literal >?</literal > operator
370
+ 支持 <literal >??</literal > 作为 <literal >?</literal > 运算符的转义序列
406
371
</member >
407
372
</simplelist >
408
373
</para >
@@ -413,17 +378,16 @@ $object = $reflector->newLazyGhost($initializer);
413
378
414
379
<!-- RFC: https://wiki.php.net/rfc/pdo_driver_specific_parsers -->
415
380
<para >
416
- Added a custom parser supporting:
381
+ 新增自定义解析器支持:
417
382
<simplelist >
418
383
<member >
419
- single, double-quoted, and backtick literals, with doubling as
420
- escaping mechanism
384
+ 单引号、双引号和反引号文字,并带有转义机制
421
385
</member >
422
386
<member >
423
- square brackets quoting for identifiers
387
+ 方括号引用标识符
424
388
</member >
425
389
<member >
426
- two-dashes and C-style comments (non-nested)
390
+ 双破折号和 C 风格注释(非嵌套)
427
391
</member >
428
392
</simplelist >
429
393
</para >
@@ -433,31 +397,28 @@ $object = $reflector->newLazyGhost($initializer);
433
397
<title >Phar</title >
434
398
435
399
<simpara >
436
- Added support for the Unix timestamp extension for Zip archives.
400
+ Zip 档案新增对 Unix 时间戳扩展的支持。
437
401
</simpara >
438
402
</sect2 >
439
403
440
- <sect2 xml : id =" migration84.new-features.readfile " >
441
- <title >Readfile </title >
404
+ <sect2 xml : id =" migration84.new-features.readline " >
405
+ <title >Readline </title >
442
406
443
407
<simpara >
444
- Added ability to change the <literal >.php_history</literal > path through
445
- the <envar >PHP_HISTFILE</envar > environment variable.
408
+ 新增通过 <envar >PHP_HISTFILE</envar > 环境变量更改 <literal >.php_history</literal > 路径的功能。
446
409
</simpara >
447
410
</sect2 >
448
411
449
- <sect2 xml : id =" migration84.new-features.readline " >
450
- <title >Readline </title >
412
+ <sect2 xml : id =" migration84.new-features.reflection " >
413
+ <title >Reflection </title >
451
414
452
415
<simpara >
453
- <classname >ReflectionAttribute</classname > now contains a
454
- <property >name</property > property to improve the debugging experience.
416
+ <classname >ReflectionAttribute</classname > 现在包含 <property >name</property > 属性,以改善调试体验。
455
417
</simpara >
456
418
457
419
<simpara >
458
- <methodname >ReflectionClassConstant::__toString</methodname > and
459
- <methodname >ReflectionProperty::__toString</methodname > now returns the
460
- attached doc comments.
420
+ <methodname >ReflectionClassConstant::__toString</methodname > 和
421
+ <methodname >ReflectionProperty::__toString</methodname > 现在返回附加的文档注释。
461
422
</simpara >
462
423
463
424
<!-- RFC: https://wiki.php.net/rfc/lazy-objects -->
@@ -521,7 +482,7 @@ $object = $reflector->newLazyGhost($initializer);
521
482
</simpara >
522
483
523
484
<simpara >
524
- Session persistence now works with a shared session module.
485
+ 持久会话现在可与共享会话模块一起使用。
525
486
</simpara >
526
487
</sect2 >
527
488
@@ -531,42 +492,35 @@ $object = $reflector->newLazyGhost($initializer);
531
492
<!-- RFC: https://wiki.php.net/rfc/correctly_name_the_rounding_mode_and_make_it_an_enum -->
532
493
<simpara >
533
494
<!-- Should this use <enumname> -->
534
- Added a new <classname >RoundingMode</classname > enum with clearer naming
535
- and improved discoverability compared to the
536
- <constant >PHP_ROUND_<replaceable >*</replaceable ></constant > constants.
537
- Moreover, four new rounding modes were added which are only available via
538
- the new <classname >RoundingMode</classname > enum.
495
+ 新增 <classname >RoundingMode</classname > 枚举,与 <constant >PHP_ROUND_<replaceable >*</replaceable ></constant >
496
+ 常量相比,其命名更清晰,可发现性更高。此外,还添加了四种新的舍入模式,这些模式仅可通过新的 <classname >RoundingMode</classname > 枚举使用。
539
497
</simpara >
540
498
</sect2 >
541
499
542
500
<sect2 xml : id =" migration84.new-features.xsl" >
543
501
<title >XSL</title >
544
502
545
503
<simpara >
546
- It is now possible to use parameters that contain both single and double
547
- quotes.
504
+ 现在可以使用包含单引号和双引号的参数。
548
505
</simpara >
549
506
550
507
<!-- RFC: https://wiki.php.net/rfc/improve_callbacks_dom_and_xsl -->
551
508
<simpara >
552
- It is now possible to pass any callable to
553
- <methodname >XSLTProcessor::registerPhpFunctions</methodname >.
509
+ 现在可以将任何 callable 传递给 <methodname >XSLTProcessor::registerPhpFunctions</methodname >。
554
510
<!-- TODO Mention XSLTProcessor::registerPHPFunctionNS ? -->
555
511
</simpara >
556
512
557
513
<simpara >
558
- Added <property >XSLTProcessor::$maxTemplateDepth</property > and
559
- <property >XSLTProcessor::$maxTemplateVars</property >
560
- to control the recursion depth of XSL template evaluation.
514
+ 添加了 <property >XSLTProcessor::$maxTemplateDepth</property > 和 <property >XSLTProcessor::$maxTemplateVars</property >
515
+ 来控制 XSL 模板计算的递归深度。
561
516
</simpara >
562
517
</sect2 >
563
518
564
519
<sect2 xml : id =" migration84.new-features.zip" >
565
520
<title >Zip</title >
566
521
567
522
<simpara >
568
- Added the <constant >ZipArchive::ER_TRUNCATED_ZIP</constant >
569
- constant, which was added in libzip 1.11.
523
+ 新增 <constant >ZipArchive::ER_TRUNCATED_ZIP</constant > 常量,libzip 1.11 中添加。
570
524
</simpara >
571
525
</sect2 >
572
526
0 commit comments