https://www.php.net/manual/en/migration74.new-features.php Самое вкусное: Short Arrow Functions Spread Operator for Arrays Typed Properties
PHP: <?php 1 ? 2 : 3 ? 4 : 5; // deprecated (1 ? 2 : 3) ? 4 : 5; // ok 1 ? 2 : (3 ? 4 : 5); // ok PHP: for ($i=$top_mods-($_GET['str']*$chat_list-$chat_list);$i > (($_GET['str'] != 1)?(($top_mods > $chat_list)?(($i > $chat_list)?$top_mods-$_GET['str']*$chat_list:(($i > $top_mods-$_GET['str']*$chat_list)?0:$top_mods-$_GET['str']*$chat_list)):0):(($top_mods > $chat_list)?$top_mods-$chat_list:0));$i--)
PHP: // Current $users->map(function($user) { return $user->first_name.' '.$user->last_name; }); // with arrow function: $users->map( fn($user) => $user->first_name.' '.$user->last_name ); сомнительное новшество)) PHP: $parts = ['apple', 'pear']; $fruits = ['banana', 'orange', ...$parts, 'watermelon']; // ['banana', 'orange', 'apple', 'pear', 'watermelon']; вроде ничего)) PHP: class User { public int $id; public string $name; } норм)) они все больше к строгой типизации идут) --- Добавлено --- PHP: 6.674_083e-11; // float 299_792_458; // decimal 0xCAFE_F00D; // hexadecimal 0b0101_1111; // binary прикол подчеркивания вообще не понял)
нормас)) js и php движутся навстречу )))))))) --- Добавлено --- Ну, да, на минорную версию вполне тянет, даже более чем))
...мне кажется большинству особенно понравится Null coalescing assignment operator PHP: <?php $array['key'] ??= computeDefault(); // is roughly equivalent to if (!isset($array['key'])) { $array['key'] = computeDefault(); }