php / php/php-src

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

Aperta
#10,853 3 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@iluuu1994 ci sta già lavorando.

Dal 17/3/2023.

Feature Status: Needs Triage
Lingua principale
C
Stelle
40.4k
Fork
8.1k
Merge medio
2g 13h
PR unite (30g)
96

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.