Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130805 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id D88AA1A00BC for ; Fri, 8 May 2026 07:44:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1778226261; bh=xsFUZAA3uKQIV57wbq7drqYFidKL6iHAF5xirdIUaFc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=jjHWtblAm0lwSRjbaNXOA8heBLs3ucXq4tdXDAiBMgsTVM3vvlyK/bDh66I3mSxGX mA0uJPx+cMXTm1krA0eLPM2HdCZYVdpFfw9qwQDdtvFDJm7MxE6Xzl/Tgo2sPYh2AD dnRuwifZ6hapbeJCbg6lgF5glzMKb5c+KeAhHmsKeK5wmux0MvfTPQWKGs6LqoCAvC BN2zU7BrdOkzjQp8IUr+vU1/DoV6HJpM9R2yj4UUHbo6ByRKuDzkrssfq7PNdI3z4i hgS9RC0Wlqp/bs/UkkjqNlTVcheKxTXnAtWPgsO1RGH6VXV7oekujcxGtWLQYn9RHS iuiwBi+2o0eXw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2645B1806C3 for ; Fri, 8 May 2026 07:44:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 8 May 2026 07:44:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1778226254; bh=GpxqkjZkzQJ4uo4tTTXr/p6naJQ8D7BFhuB+DkaydlM=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type:from:to:cc:subject:message-id; b=hUsE3OkvtYRtAPP52OVdswkBOjje+8lx8CvoXIQWRXWtJvv/w6RdpVsOD3b2tAHoU tVkzNbQw0RHK8dzzkAVbLalAmsAsGEIn/zRUMO5Hn8X/oJH9XBWagypxlShRQF3xhX 9uETfjbm3HwS/uO2Ud09wzpotODQLxh+6KD04P1JCCi+A78FQphiMMlRUi7CCSA7F+ ycw/TBWMDFJ5szQdtx+jHJCutAY+gM9vLZjb3gjbR1e5mQBannFihhGWAedzn5Fm38 bAORMCaI45ES9fcPCglj9mEJ0bS8CBysNHQteY5tP0uEFIABqXFn5ajlrlnnuaMuRa P6BXfXlSxa6Rw== Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Date: Fri, 08 May 2026 09:44:14 +0200 To: LamentXU <1372449351@qq.com> Cc: internals Subject: Re: [PHP-DEV] Propose changes to warning message in declare(encoding=...) when encoding is not a multibye-required encoding method In-Reply-To: References: Message-ID: <3dde90c487d1135b0d504e2a41a640e6@bastelstu.be> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) 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