Re: Deprecate declare(encoding='...') + zend.multibyte + zend.script_encoding + zend.detect_unicode ?

From: Date: Tue, 28 Nov 2023 22:57:39 +0000
Subject: Re: Deprecate declare(encoding='...') + zend.multibyte + zend.script_encoding + zend.detect_unicode ?
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-121833@lists.php.net to get a copy of this message
On Tue, Nov 28, 2023 at 12:48 PM Hans Henrik Bergan <divinity76@gmail.com> wrote: > >If the solution is as easy as just converting the encoding of the > source file, then why did we even need to have this setting at all? > Why did PHP parser support encodings that demanded the introduction of > > I've read your question but don't have an answer to it, hopefully > someone else knows. These settings predate the ubiquity of UTF-8, which did not begin to see widespread adoption until the mid-to-late 2000s, and did not reach ubiquity until the mid-2010s: https://en.wikipedia.org/wiki/Popularity_of_text_encodings mbstring.script_encoding was introduced with this commit and released in PHP 4.3 (renamed to zend.script_encoding in PHP 5.4): https://github.com/php/php-src/commit/f30b722f14521fbad2fabe5fdcaa2b60fe97eebb zend.detect_unicode introduced in this commit, released with PHP 5.1: https://github.com/php/php-src/commit/a8c6b992b8894763c59276c1142971aa9a314500 zend.multibyte introduced with this commit, released with PHP 5.4: https://github.com/php/php-src/commit/ab93d8c621645e05d6a6a431d52ac64eda956673 declare(encoding) appears to predate all of the PHP 4.0 tagged releases, including the pre-release ones. - Mark Trapp

« previous php.internals (#121833) next »