PHP Digest # 187 (18 أغسطس - 7 سبتمبر 2020)



اختيار جديد مع روابط للأخبار والمواد. في الإصدار: PHP 8 beta 3 ، تم اعتماد بناء جملة السمة الجديدة في PHP 8 ، Zephir كل شيء ، مجموعة كاملة من الأدوات المفيدة ، والمقالات ، ومقاطع الفيديو ، والبودكاست.



استمتع بالقراءة!





الأخبار والإصدارات



  • PHP 8 beta 3 - آخر إصدار تجريبي في الدورة. الإصدار القادم سيكون RC 1 ، والمتوقع في 17 سبتمبر.
  • PHP 7.4.10 ، PHP 7.3.22
  • Zephir Phalcon — Zephir PHP- Phalcon , Zephir , Phalcon 5 PHP.
  • WordPress PHP. Matt Mullenweg, PHP 5.6 . PHP ≤5.6 21.6% WP.


PHP Internals



  • التحقق من [RFC] Shorter Attribute Syntax Change — - . #[Attribute].
    #[
      ORM\Entity,
      ORM\Table("user")
    ]
    class User
    {
        #[ORM\Id, ORM\Column("integer"), ORM\GeneratedValue]
        private $id;
    
        #[ORM\Column("string", ORM\Column::UNIQUE)]
        #[Assert\Email(["message" => "The email '{{ value }}' is not a valid email."])]
        private $email;
    }
    


    , @@Attr PR. #[ ] , .



    //   
    #[ORM\Entity]
    #[ORM\Table("user")]
    
    //  
    #[
        ORM\Entity,
        ORM\Table("user")
    ]


    .
  • جديد [RFC] any() and all() on iterables — :

    any(iterable $input, ?callable $callback = null): bool — , , true.

    all(...)true , true .



    :



    // 
    $satisifes_predicate = false;
    foreach ($item_list as $item) {
        if (API::satisfiesCondition($item)) {
            $satisfies_predicate = true;
            break;
        }
    }
    if (!$satisfies_predicate) {
        throw new APIException("No matches found");
    }
    
    // 
    if (!any($item_list, fn($item) => API::satisfiesCondition($item))) {
        throw new APIException("No matches found");
    }






Symfony





Laravel





Yii





Async PHP









/












شكرآ لك على أهتمامك!



إذا لاحظت خطأ أو عدم دقة ، فيرجى إخبارنا بشكل شخصي .

الأسئلة والاقتراحات تكتب إلى البريد أو تويتر .



المزيد من الأخبار والتعليقات على قناة PHP Digest Telegram .



إرسال ارتباط

روابط البحث في جميع الملخصات

الإصدار السابق: PHP-Digest # 186




All Articles