Re: Multibyte and declate (PHP5.4)

From: Date: Thu, 11 Aug 2011 21:56:35 +0000
Subject: Re: Multibyte and declate (PHP5.4)
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-54512@lists.php.net to get a copy of this message
Hi Sebastian 2011/8/11 Sebastian Krebs <sebastian.krebs.berlin@googlemail.com>: > Hi, > > With PHP5.4 I get this warning > > | Warning: declare(encoding=...) ignored because Zend multibyte feature > | is turned off by settings in [..] > > because of > > | declare(encoding = 'UTF-8'); > > An except from the manual [1] > In PHP 5.4, the compile time switch was removed and made into an ini directive, which lives under the name of zend.multibyte = [On|Off]. For the question about declare's availability: No Zend Multibyte support does not make the engine ignore the construct totally, as we also got another statement; ticks that can be used in declare aswell. For the question about why its not enabled by default? Performance, you don't want to enable multibyte support when most of your code lives in a single byte char format anyway, some calls are most costly because you can no longer jump just one byte and have to validate what kind of character sequence we're at now. -- regards, Kalle Sommer Nielsen kalle@php.net

« previous php.internals (#54512) next »