php / php/php-src

Check UTF-8 validity for all constant strings on compile time

Abierto
#10,853 3 comentarios 0 reacciones 1 asignado Ver en GitHub

@iluuu1994 ya está trabajando en esto.

Desde el 17/3/2023.

Feature Status: Needs Triage
Lenguaje dominante
C
Estrellas
40.4k
Forks
8.2k
Merge medio
2 d 13 h
PR fusionados (30 d)
96

Descripción

Description

Currently the UTF-8 string validity is checked on demand and cached the string if not interned.

However:

  • when a string is interned, such flag cannot be cached on runtime (at least not due TS)
  • it is not stored back to the source script cache/opcache, ie. the validity is checked on every request at least once
  • when a string is created from unvalidated source before checking, the validation cannot be cached
  • currently only "valid UTF-8" flag is cached , but when a string is "invalid UTF-8", nothing is cached at all

This is a feature request to:
a) check UTF-8 validity on compile time on every const string
b) store a flag if UTF-8 validity was checked or not

Thanks to #10436 the UTF-8 validity check is very fast and the compile time impact should be minimal.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.