Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54513 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69271 invoked from network); 12 Aug 2011 05:52:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Aug 2011 05:52:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=sebastian.krebs.berlin@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=sebastian.krebs.berlin@googlemail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 74.125.82.54 as permitted sender) X-PHP-List-Original-Sender: sebastian.krebs.berlin@googlemail.com X-Host-Fingerprint: 74.125.82.54 mail-ww0-f54.google.com Received: from [74.125.82.54] ([74.125.82.54:65203] helo=mail-ww0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D3/A3-40016-9BFB44E4 for ; Fri, 12 Aug 2011 01:52:58 -0400 Received: by wwg11 with SMTP id 11so1916735wwg.11 for ; Thu, 11 Aug 2011 22:52:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=b7aX6eWq742rkPSnEGCasSf6vZUqD/zCwd99v+BYcX0=; b=owzTF+nasbr3xDhZ4nUW9lAUz86b2CBb8Fp8Hn/KcPLhl+0KeNfHQBVoEt7uoooZDu XuXf1CJWr8/8gF3KF1dnH10HYAesnlaZMoklDn8R1L+spJa+SWRjjJelO/ha0m4atjJQ //K5jQy/XHUefnEesqr9ZzOtHemXqF9GvoOE8= MIME-Version: 1.0 Received: by 10.216.68.17 with SMTP id k17mr389743wed.63.1313128374056; Thu, 11 Aug 2011 22:52:54 -0700 (PDT) Sender: sebastian.krebs.berlin@googlemail.com Received: by 10.216.25.135 with HTTP; Thu, 11 Aug 2011 22:52:54 -0700 (PDT) In-Reply-To: References: <4E443778.2050603@googlemail.com> Date: Fri, 12 Aug 2011 07:52:54 +0200 X-Google-Sender-Auth: QlPLsB-pxEgaFi-kBFbXmlThKcw Message-ID: To: PHP internals list Content-Type: multipart/alternative; boundary=000e0ce0ccbc47b7de04aa488608 Subject: Re: [PHP-DEV] Multibyte and declate (PHP5.4) From: krebs.seb@googlemail.com (Sebastian Krebs) --000e0ce0ccbc47b7de04aa488608 Content-Type: text/plain; charset=ISO-8859-1 Hi, 2011/8/11 Kalle Sommer Nielsen > Hi Sebastian > > 2011/8/11 Sebastian Krebs : > > 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]. > Ah, I see. multibyte is either compiled in, or not (PHP5.3), or its either enabled, or not (PHP5.4). Now I see a difference between "not compiled in" (declare(encoding) is ignored) and "not enabled" (declare(encoding) throws a warning). > 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. > This means, that either the file is ASCII and I should omit the `declare(encoding)`-statement [1], or its not ASCII, but then -- when multibyte is disabled -- I should not assume, that everything works fine? That is, what the warning should tell me? [1] Sidenote: Maybe it could ignore declare(encoding='ASCII') ;) > > -- > regards, > > Kalle Sommer Nielsen > kalle@php.net > At all I think now, that the warning is probably the better reaction than just doing nothing. No further question, thanks for that :) Regards, Sebastian --000e0ce0ccbc47b7de04aa488608--