PHP Digest No. 176 (del 11 al 23 de marzo de 2020)


Nueva selección con enlaces a noticias y materiales. En el lanzamiento: actualizaciones de PHP y Composer 1.10, transferencias de conferencias, 3 nuevas ofertas de RFC de PHP Internals, una porción de herramientas útiles, videos, podcasts y mucho más.

¡Disfruta leyendo!



Noticias y lanzamientos



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 Checkis_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





/



¡Gracias por la atención!

Si nota un error o imprecisión, infórmeme en PM .
Preguntas y sugerencias escritas a mail o twitter .

Más noticias y comentarios sobre el canal de telegramas PHP Digest .

Enviar enlace
Buscar enlaces para todos los resúmenes
Versión anterior: PHP Digest No. 175


All Articles