带有新闻和资料链接的新鲜选择。问题:来自PHP Internals的2条被接受,2条被拒绝和6条新的RFC提议,对PHP 8的回顾,有用的工具,在线活动,视频,播客等的一部分。
享受阅读!
新闻与发布
PHP Internals
- - PHP 8 — Sara Golemon (ex-HHVM/Hack, - PHP 7.2) Gabriel Caruso.
[RFC] Locale-independent float to string cast — . 3,14
3.14
, .
[RFC] Add str_starts_with() and str_ends_with() functions — str_contains() : str_starts_with()
str_ends_with()
.
[RFC] Match expression — . , , RFC .
[RFC] Guard statement — guard
, , if
. Swift, - . .- [RFC] Conditional Return, Break, and Continue Statements —
return if ($condition);
function divide($dividend, $divisor = null) {
return if ($divisor === null || $divisor === 0);
return 0 if ($divisor === null || $divisor === 0);
return $dividend / $divisor;
}
Ruby, if (condition) return;
? - [RFC] Named Arguments — PHP 8 , , .
htmlspecialchars($string, double_encode: false);
htmlspecialchars($string, ENT_COMPAT | ENT_HTML401 , ini_get("default_charset"), false);
. - [RFC] <<Deprecated>> Attribute — /, , , .
trigger_error()
.
<?php
<<Deprecated("use test2() instead")>>
function test() {}
class Foo {
<<Deprecated>>
public function test() {}
public function test2(<<Deprecated>> $value) {}
<<Deprecated>>
public $value;
<<Deprecated>>
const FOO = 1;
}
- [RFC] Add CMS Support —
WordPress PHP RFC-5652. - [RFC] Make sorting stable — PHP . , ().
sort, rsort, usort, asort, arsort, uasort, ksort, krsort, uksort, array_multisort
. , (). - [RFC] Opcache optimization without any caching — (
opcache.optimization_level=0
) — CLI-, , .
, . , .

Symfony
Laravel
Async PHP

/
感谢您的关注!
如果您发现错误或不准确,请在PM中通知我。
问题和建议写在邮件或推特上。
有关PHP Digest Telegram Channel的更多新闻和评论。
发送链接
搜索所有摘要的链接
← 先前版本:PHP Digest 179