PHP摘要179(2020年4月21日至5月4日)


带有新闻和资料链接的新鲜选择。问题:4个已接受的PHP 8 RFC提案,包括属性(注释/修饰符),一部分有用的工具,在线会议和会议,视频,播客等。

享受阅读!



新闻与发布


  • PHP Russia Online,5月13日-感谢Badoo,会议将免费进行。该计划预定了Chris Holland,Tobias Nyholm,Anna Filina,Markus Winand,Andreas Heigl,Anton Titov和Nicolas Grekas的7个报告。对于所有报告,将提供可从Skyeng同时翻译成俄语的信息流。
  • PHP fwdays'20-也在5月30日和31日以在线格式举行了为期两天的会议。
  • Fwdays PHP在线聚会 -2020年5月19日19:00-21:00 UTC + 3,两个英文报告的免费在线mitap。

PHP内部


  • [RFC]属性v2-在PHP 8中,将添加带有尖括号语法的完整属性(注释/修饰符)<< >>

    隐藏文字
    <<ExampleAttribute>>
    class Foo
    {
        <<ExampleAttribute>>
        public const FOO = 'foo';
    
        <<ExampleAttribute>>
        public $x;
    
        <<ExampleAttribute>>
        public function foo(<<ExampleAttribute>> $bar) { }
    }
    
    $object = new <<ExampleAttribute>> class () { };
    
    <<ExampleAttribute>>
    function f1() { }
    
    $f2 = <<ExampleAttribute>> function () { };
    
    $f3 = <<ExampleAttribute>> fn () => 1;
    

    . Benjamin Eberlei <<Deprecated>>, trigger_error :

    <<Deprecated>>
    function test() {}
    // Deprecated: Function test is deprecated in %s
    
    <<Deprecated("use test3() instead")>>
    function test2() {}
    // Deprecated: Function test2 is deprecated use test3() instead in %s
    
  • [RFC] Allow trailing comma in parameter list — PHP 8 .

    class Uri {
        private function __construct(
            ?string $scheme,
            ?string $user,
            ?string $pass,
            ?string $host,
            ?int $port,
            string $path,
            ?string $query,
            ?string $fragment, // <-- !
        ) {
            ...
        }
    }
    
  • [RFC] Change Default PDO Error Mode — PDO PDO::ERRMODE_EXCEPTION SQL .
  • [RFC] Stricter type checks for arithmetic/bitwise operators — , PHP 8 TypeError, , .
  • [RFC] Type casting in array destructuring expressions — .
  • [RFC] Always available JSON extension — JSON .
  • [RFC] Match expressionmatch , :

    match ($x) {
        0 => {
            foo();
            bar();
            baz();
        },
    }
    

    , feature-freeze PHP 8 , RFC .



Symfony



Laravel



Yii



Async PHP






/



!

— , , .
.

Telegram- PHP Digest.



: PHP- № 178


All Articles