Seleksi segar dengan tautan ke berita dan bahan. Dalam masalah ini: 2 diterima, 2 ditolak dan 6 penawaran RFC baru dari PHP Internals, ulasan tentang PHP 8, sebagian dari alat yang berguna, acara online, video, podcast, dan banyak lagi.
Selamat membaca!
Berita dan Siaran
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

/
Terimakasih atas perhatiannya!
Jika Anda melihat kesalahan atau ketidaktepatan - mohon informasikan kepada saya di PM .
Pertanyaan dan saran menulis ke email atau twitter .
Lebih banyak berita dan komentar di Saluran Telegram PHP Digest .
Kirim tautan
Cari tautan untuk semua intisari
β Rilis sebelumnya: PHP Digest No. 179