Fresh selection with links to news and materials. In release: PHP 7.4.0 alpha 2, BeerPHP, a review of recent RFCs from PHP Internals, including Strict operators directive, a portion of useful tools, videos, and more.
Enjoy reading!
$array = [0, 1, 2, 3]; unset($array[3], $array[2]); $arrayCopy = $array; $arrayCopy[] = 2; // , . // . assert($arrayCopy === [0, 1, 2]);
strict_operators
, which will restrict type conversions and allow you to throw a TypeError error for incompatible operands. The document is very detailed and describes many examples, I recommend to see the whole. switch
construction.implode()
in any order - it is proposed to leave only the canonical implode(string $glue, array $pieces)
;float
you can use the real
type - the latter will be removed.str_begins()
, str_ibegins()
, str_ends()
, str_iends()
, mb_str_begins()
, mb_str_ibegins()
, mb_str_ends()
, and mb_str_iends()
.base_convert()
improvements with Scott Dutton .Thanks for attention!
If you notice an error or inaccuracy - please inform the PM .
Write questions and suggestions by mail or twitter .
')
More news and comments on the PHP Digest Telegram channel.
Send link
Search links for all digests
← Previous release: PHP Digest number 158
Source: https://habr.com/ru/post/458292/
All Articles