Re: Propose changes to warning message in declare(encoding=...) when encoding is not a multibye-required encoding method

From: Date: Fri, 08 May 2026 07:44:14 +0000
Subject: Re: Propose changes to warning message in declare(encoding=...) when encoding is not a multibye-required encoding method
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-130805@lists.php.net to get a copy of this message
Hi Am 2026-05-02 10:50, schrieb LamentXU:
I am writing to ask for suggestions in bug Issue #21538 in php-src [1]. Currently when zend.multibyte=0, declare(encoding=...) will emit a warning for whatever the encoding is: […] This would be a very minor change and do not worth a separate RFC. However, I think it is still important to send a email to gather opinions :) Also thank @alexdowad for giving me ideas. TiA :)
I suppose that declare(encoding=…) is so rarely used that folks will not have a strong opinion on it either way - except possible to remove the feature entirely to keep the parser simpler. That said: Suppressing the warning for ASCII and UTF-8 makes sense to me if folks want to explicitly specify it for some reason and zend.multibyte indeed has no effect at all on those encodings. Best regards Tim Düsterhus

« previous php.internals (#130805) next »