PHP Digest # 206 (15 al 29 de junio de 2021)

Foto: Ivan Gantsev .



Una selección de noticias y materiales nuevos del mundo PHP. En versión: la segunda versión alfa de PHP 8.1.0 y una descripción general de qué más se puede lanzar; un nuevo RFC que propone agregar un mecanismo de protección de inyección. Además de una parte de herramientas, artículos, videos y podcasts útiles.



¡Disfruta leyendo!



noticias



  • PHP 8.1.0 alpha 2



    .



    20 . , RFC 22 8.1.



    , :

    • Enum RFC;
    • never



      RFC;
    • RFC;
    • RFC;
    • RFC;
    • float



      int



      , RFC;
    • Serializable



      RFC;
    • 0o



      RFC;
    • $GLOBALS RFC;
    • RFC;




    php.watch/versions/8.1.



    ( ):





PHP Internals



  • cheque [RFC] Pure intersection types



    PHP 8.1 . TypeA&TypeB



    , instanceof TypeA



    instanceof TypeB



    .



    , :

    , ? , , ( ).



    : PHP.



  • [RFC] Is_Noble



    SQL- PHP . RFC .



    is_noble(string $str): bool



    , «», , .



    is_noble('Example'); // true
    
    $a = 'Hello';
    $b = 'World';
    
    is_noble($a); // true
    is_noble($a . $b); // true,      
    is_noble("Hi $b"); // true
    
    is_noble($_GET['id']); // false     
    is_noble(sprintf('Hi %s', $_GET['name'])); // false
    is_noble('/bin/rm -rf ' . $_GET['path']); // false
    is_noble('<img src=' . htmlentities($_GET['src']) . ' />'); // false —      
    is_noble('WHERE id = ' . $db->real_escape_string($_GET['id'])); // false
    
          
          



    3v4l.org/1aFC2#focus=rfc.literals



    100%, .



  • [RFC] Deprecate boolean to string coercion



    bool



    string



    , :
    (string)true  -> '1'
    (string)false -> ''
    
          
          







  • Ilija Tovilo RFC 8.1, «» :-)













Symfony







Laravel













/







miscelánea



  • Una idea interesante es anular las funciones integradas y deshabilitar la implementación estándar a través de disable_functions :

  • ¿Bitrix realmente se convertirá en la norma?








Suscríbase al canal PHP Digest Telegram .



Si te gustó el resumen, dale un plus; esto es muy motivador para seguir haciéndolo.



¿Detectó un error o error tipográfico? Informar en un habr personal o telegrama .



Puede enviar el enlace a través del formulario o simplemente escribiéndome en un telegrama .

Buscar enlaces en todos los resúmenes

Número anterior: PHP-Digest # 205








All Articles