PHP Digest # 196 (1er au 11 janvier 2021)



Nouvelle sélection avec des liens vers des nouvelles et des documents. En version: version PHP 8.0.1, moteur MySQL sur PHP de Vimeo et autres versions, mise à jour de Enum et nouvelles propositions pour PHP 8.1, "vulnérabilité" dans Laminas, outils, articles, vidéos, PHP Live Digest à 20h00 heure de Moscou.



Bonne lecture!









Nouvelles et communiqués



  • PHP 8.0.1, 7.4.14, 7.3.26CVE-2020-7071 url_parse() - http://php.net\@aliyun.com/aaa.do



    . 8.0 7.4 .
  • habr PHP — Skyeng PHP Digest.
  • PHP - Git:github.com/php/doc-base!


PHP Internals



  • [RFC] Enumerations, Round 2 — Enum PHP . : () , Enum ; ; value()



    . № 194 .
  • [RFC] Bundling ext/simdjson into core — PHP simdjson. ext/json json .



    , . PECL , .
  • [RFC] Array unpacking with string keys — PHP 5.6 :



    variadic_function(...['apple', 'banana', 'lemon']);
          
          





    PHP 7.4 :



    $parts = ['apple', 'pear'];
    $fruits = ['banana', 'orange', ...$parts, 'watermelon'];
    // ['banana', 'orange', 'apple', 'pear', 'watermelon'];
    
          
          





    . PHP 8.0 , .



    PHP 8.1 :



    $array1 = ['a' => 'apple', 'p' => 'pear'];
    $array2 = ['b' => 'banana', 'o' => 'orange'];
    $array = [...$array1, ...$array2];
    //     :
    $array = array_merge($array1, $array2);
    
          
          



  • [PR] Use 'ENT_QUOTES|ENT_SUBSTITUTE' for HTML encoding and decoding functions — - , htmlspecialchars()



    ENT_QUOTES



    ENT_SUBSTITUTE



    :



    • ENT_QUOTES — WordPress

    • ENT_QUOTES — Blade (Laravel)

    • ENT_QUOTES | ENT_SUBSTITUTE — Twig (Symfony or Slim)

    • ENT_QUOTES | ENT_SUBSTITUTE — CodeIgniter

    • ENT_QUOTES | ENT_SUBSTITUTE — CakePHP

    • ENT_QUOTES | ENT_SUBSTITUTE — Yii

    .
  • vérifier [RFC] Restrict $GLOBALS usage — . $GLOBALS



    PHP 8.1
    La lecture, l'écriture, la définition et la désactivation continueront de fonctionner:
    $GLOBALS['x'] = 1;
    
    echo $GLOBALS['x']
    
    isset($GLOBALS['x']);
    unset($GLOBALS['x']);
          
          





    Mais une tentative de changer la variable elle $GLOBALS



    - même provoquera une erreur:
    $GLOBALS = [];
    $GLOBALS =& $x;
    $x =& $GLOBALS;
    unset($GLOBALS);
          
          





    , $GLOBALS



    :
    
    asort($GLOBALS);
    // > Compile-time error
          
          





    PHP PHP.


  • [RFC] Concepts to improve mysqli extension — PHP PDO. mysqli. , .
  • [RFC] Add array_is_list(array $array): bool — , true



    , 0, 1, 2 ... count($value)-1



    . is_list()



    array_is_list()



    . .



    Symfony PHP 8.1 .
  • PHP 8.1 : xxHash MurmurHash3.




  • dollar Dump Debugging Evolved — Ray — Spatie — Ray. ray($anything)



    , PHP- .



    Xdebug, . var_dump(...)/die()



    , .



    vidéo PHP Live.
  • AdamGaskins/barcoder — SVG- (QR, Datamatrix, ..).
  • vimeo/php-mysql-engine — MySQL PHP. , , MySQL . PDO PDO MySQL. : .
  • jvoisin/snuffleupagus — PHP- c. , , , , .
  • mbunge/php-attributes — / PHP 8. .
  • mlocati/docker-php-extension-installer — PHP- Docker.
  • php-opencv/php-opencv — ( , , . .) PHP 8. .


Symfony



  • 5 , Symfony 5.2 + PHP 8.0
  • How to create service bundles for a Symfony application
  • Symfony #732 (4-10 2021)
  • 2020 Symfony


Laravel



  • REST API tailflow/laravel-orion.
  • habr Laravel– (28 2020 – 10 2021)
  • lorisleiva/laravel-actions 2.0 — -.
  • vidéo Laravel Snippet #26 — Jetstream 2.x, Forge Circles, Spark «Next», React SPAs.


Yii



  • habr Yii 2020, 8
  • vidéo E-commerce Yii 2 — 16 . thecodeholic/yii2-ecommerce-website.


Zend / Laminas



  • 2020 Laminas Project
  • Zend Framework / Laminas — «» :



    class MyClassWithToString {
        public $name;
    
        public function __construct($name) {
            $this->name = $name;
        }
    
        public function __toString() {
            return (string) $this->name;
        }
    }
    
    $input = unserialize('O:19:"MyClassWithToString":1:{s:4:"name";s:15:"/tmp/etc/passwd";}');
    if ($input instanceof MyClassWithToString) {
        unlink($input);
    }
          
          





    is_string()



    unlink()



    . , . php.net , unserializie()



    .



    , 2017 , unserialize()



    ( PHP).



    Yii.


Async PHP



  • Swoole PHP 4.6.0 — URL.
  • amphp/mysql-dbal — Doctrine DBAL/ORM Amphp v3.




  • PHP FPM Kubernetes .
  • — , PHP. , public/private get set

    clone-with.



    PSR-7.
  • PHP
  • habr legacy — , ! PHP


/



  • vidéo PHP Live #2: PHP 8.1, , .
  • vidéo Event SourcingEventSaucePHP/EventSauce.
  • vidéo -- Mathhew Napolim50/simple.




  • habr 60+ - PHP-, .
  • PHP- 3D .
  • github.com/thank-you-php — PHP. - .













Aujourd'hui, il y aura le troisième flux basé sur PHP Digest. Analyse des nouvelles et des liens du numéro avec détails et détails, un aperçu de ce qui a été envoyé, intéressant mais non inclus dans le numéro, les résultats du dessin et un nouveau concours avec des éléphants.

À partir de 20h00 Moscou, Minsk / 19h00 Kiev.






Si vous remarquez une erreur ou une inexactitude, veuillez nous en informer dans un habr personnel ou un télégramme .





Plus de nouvelles et de commentaires sur la chaîne PHP Digest Telegram .



Envoyer le lien

Rechercher des liens dans tous les résumés

Numéro précédent: PHP Digest # 195




All Articles