带有新闻和资料链接的新鲜选择。在发行版中:PHP和Composer 1.10更新,会议转移,PHP Internals提供的3个新RFC提供,一部分有用的工具,视频,播客等等。
享受阅读!
新闻与发布
PHP Internals
- [RFC] str_contains — .
str_contains()
, . - [RFC] throw expression — PHP ,
throw
– , . , :$callable = fn() => throw new Exception();
$value = $nullableValue ?? throw new InvalidArgumentException();
$value = $falsableValue ?: throw new InvalidArgumentException();
$value = !empty($array)
? reset($array)
: throw new InvalidArgumentException();
- [RFC] Compact Object Property Assignment — . [RFC] Object Initializer, . :
doTheFoo((new Foo)->[
a = 1,
b = 2,
c = 3,
]);
$myObj = new Foo();
$myObj->a = 1;
$myObj->b = 2;
$myObj->c = 3;
doTheFoo($myObj);
- [RFC] Is Literal Check —
is_literal()
, / , , , PHP, .define('TABLE', 'example');
$sql = 'SELECT * FROM ' . TABLE . ' WHERE id = ?';
is_literal($sql);
$sql .= ' AND id = ' . mysqli_real_escape_string($db, $_GET['id']);
is_literal($sql);
, . , . - [RFC] Write-Once Properties — , . , , , .
- RFC .
.
Understanding RFC attitudes , - , - , PHP Internals RFC.

Symfony
Laravel
Async PHP

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