PHP Digest No. 176 (11 a 23 de março de 2020)


Nova seleção com links para notĂ­cias e materiais. Na versĂŁo: atualizaçÔes do PHP e do Composer 1.10, transferĂȘncias de conferĂȘncia, 3 novas ofertas de RFC da PHP Internals, uma parte de ferramentas Ășteis, vĂ­deos, podcasts e muito mais.

Gostar de ler!



Notícias e Lançamentos



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





/



Obrigado pela atenção!

Se vocĂȘ perceber um erro ou imprecisĂŁo - informe-me no PM .
Perguntas e sugestÔes escreva para o correio ou twitter .

Mais notĂ­cias e comentĂĄrios no canal PHP Digest Telegram .

Enviar link
Pesquisar links para todos os resumos
← Versão anterior: PHP Digest No. 175


All Articles