PHP Digest No. 176 (March 11 - 23, 2020)


Fresh selection with links to news and materials. In the release: PHP and Composer 1.10 updates, conference transfers, 3 new RFC offers from PHP Internals, a portion of useful tools, videos, podcasts and much more.

Enjoy reading!



News and Releases


  • PHP 7.4.4 , PHP 7.3.16 , PHP 7.2.29 - Security releases, everyone is recommended to upgrade.
  • Composer 1.10.0 - Among other changes, a new β€œfunding” field has been added to composer.json, in which you can specify how to support the project. By default, data is taken from FUNDING.yml on GitHub. A new team has also been added composer fundthat shows sponsorship information for your addictions.

  • , .
    β€’ PHP Russia – , 13 PHP Russia Online.
    β€’ habr PHP- , .
    β€’ : Laracon EU Madrid, Midwest PHP.

PHP Internals


  • [RFC] str_contains β€” . str_contains() , .
  • [RFC] throw expression β€” PHP , throw – , . , :
    $callable = fn() => throw new Exception();
    
    $value = $nullableValue ?? throw new InvalidArgumentException();
    
    $value = $falsableValue ?: throw new InvalidArgumentException();
    
    $value = !empty($array)
                ? reset($array)
                : throw new InvalidArgumentException();
  • [RFC] Compact Object Property Assignment β€” . [RFC] Object Initializer, . :
    doTheFoo((new Foo)->[
        a = 1,
        b = 2,
        c = 3,
    ]);
    
    // :
    
    $myObj = new Foo();
    
    $myObj->a = 1;
    $myObj->b = 2;
    $myObj->c = 3;
    
    doTheFoo($myObj);
  • [RFC] Is Literal Check β€” is_literal(), / , , , PHP, .
    define('TABLE', 'example');
    
    $sql = 'SELECT * FROM ' . TABLE . ' WHERE id = ?';
    
    is_literal($sql); // Returns true
    
    $sql .= ' AND id = ' . mysqli_real_escape_string($db, $_GET['id']);
    
    is_literal($sql); // Returns false
    

    , . , .
  • [RFC] Write-Once Properties β€” , . , , , .
  • RFC .
    .
    Understanding RFC attitudes , - , - , PHP Internals RFC.



Symfony



Laravel



Async PHP





/



Thank you for the attention!

If you notice a mistake or inaccuracy - please inform me in PM .
Questions and suggestions write to mail or twitter .

More news and comments on the PHP Digest Telegram Channel .

Send link
Search links for all digests
← Previous release: PHP Digest No. 175


All Articles