Une sélection de nouvelles et de matériaux frais du monde PHP. Dans la version : la deuxième version alpha de PHP 8.1.0 et un aperçu de ce qui pourrait être publié ; une nouvelle RFC proposant d'ajouter un mécanisme de protection contre les injections. Plus une partie d'outils utiles, d'articles, de vidéos et de podcasts.
Bonne lecture!
nouvelles
PHP 8.1.0 alpha 2
.
20 . , RFC 22 8.1.
, :
php.watch/versions/8.1.
( ):
- [RFC] Partial Function Application — 27: 17;
RFC, Larry Garfield, , PFA - PHP.
- [RFC] First-class callable syntax — , Partial Function Application;
- [RFC] Pipe Operator v2 — , RFC ;
- [RFC] Property Accessors — , ;
- [RFC] Readonly properties 2.0 — , Property Accessors;
- [RFC] New in initializers — , ;
- [RFC] Is_Noble — , ;
- [RFC] Partial Function Application — 27: 17;
PHP Internals
[RFC] Pure intersection types
PHP 8.1 .TypeA&TypeB
,instanceof TypeA
instanceof TypeB
.
, :
, ? , , ( ).
: PHP.
[RFC] Is_Noble
SQL- PHP . RFC .
is_noble(string $str): bool
, «», , .
3v4l.org/1aFC2#focus=rfc.literalsis_noble('Example'); // true $a = 'Hello'; $b = 'World'; is_noble($a); // true is_noble($a . $b); // true, is_noble("Hi $b"); // true is_noble($_GET['id']); // false is_noble(sprintf('Hi %s', $_GET['name'])); // false is_noble('/bin/rm -rf ' . $_GET['path']); // false is_noble('<img src=' . htmlentities($_GET['src']) . ' />'); // false — is_noble('WHERE id = ' . $db->real_escape_string($_GET['id'])); // false
100%, .
[RFC] Deprecate boolean to string coercion
bool
string
, :(string)true -> '1' (string)false -> ''
- Ilija Tovilo RFC 8.1, «» :-)
- VKCOM/nocolor — VK PHP . deptrac. PHPRussia.
- beyondcode/expose 2.0 — : , . ngrok, PHP.
- nunomaduro/phpinsights v2.0 — CLI- .
- nunomaduro/patrol — CLI , composer.json.
- k-samuel/faceted-search — . PHP (100_000 10 ) ElasticSearch.
- Ne-Lexa/php-crossplane — NGINX. NeLexa.
Symfony
Laravel
- laravelexamples.com — Laravel YouTube- Laravel Daily.
API Laravel
REST API c
Orbit — Laravel SQL
Mohamed Said (Laravel core): 5 , Laravel; Laravel — laravel/echo; Laravel (#3) – 2021-06-23
PHP-Compiler, FFI.
PHP — — PHP.
« , » — PHP Python Ruby, PHP .
-: , PHP ( )
Rector — The Power of Automated Refactoring — rectorphp/rector . $5 23 .- ? — Brent Roose: xml, yaml PHP- . IDE .
- b-viguier/php-emoji — PHP emoji:
/
PHP № 89: All Cups.
PHP Internals News podcast #89 — Partial Function Application Larry Garfield Joe Watkins.
Jamais * Utiliser des tableaux - Conférence de Larry Garfield.
Interprétation géométrique du principe de substitution de Barbara Liskov - Utile pour comprendre une fois pour toutes ce que cela signifie.
divers
- Une idée intéressante est de remplacer les fonctions intégrées et de désactiver l'implémentation standard via disable_functions :
- Bitrix va-t-il vraiment devenir la norme ?
Abonnez-vous à la chaîne PHP Digest Telegram .
Si vous avez aimé le condensé, donnez-lui un plus - c'est très motivant de continuer à le faire.
Avez-vous repéré une erreur ou une faute de frappe? Informer dans un habr ou un télégramme personnel .
Vous pouvez envoyer le lien via le formulaire ou simplement en m'écrivant par télégramme .
Rechercher des liens dans tous les résumés
← Numéro précédent : PHP-Digest # 205