#50464 [Com]: declare encoding doesn't work with
| From: | marco dot weber at uni-trier dot de | Date: | Sun, 13 Dec 2009 01:00:00 +0000 |
| Subject: | #50464 [Com]: declare encoding doesn't work with | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-145680@lists.php.net to get a copy of this message | ||
ID: 50464
Comment by: marco dot weber at uni-trier dot de
Reported By: marco dot weber at uni-trier dot de
Status: Open
Bug Type: *General Issues
Operating System: ANY
PHP Version: 5.3.1
New Comment:
http://lists.typo3.org/pipermail/flow3-general/2009-December/000042.html
Previous Comments:
------------------------------------------------------------------------
[2009-12-13 00:31:11] marco dot weber at uni-trier dot de
Description:
------------
When using the the declare encoding statement in your php script, you
will get an fatal error, when you try to include a subscript with a
defined encoding.
This only happens with php5.3.x version that was compiled with
'--enable-zend-multibyte'
When i'm using a php5.3.x version WITHOUT '--enable-zend-multibyte',
there is no fatal error. And everything works as expected.
Reproduce code:
---------------
i used a php5.3.1 with '--enable-zend-multibyte'
just try to call the index.php binary
index.php file:
<?php
declare(encoding='UTF-8');
namespace marcotest;
require_once('sub.inc.php');
?>
sub.inc.php file:
<?php
declare(encoding='UTF-8');
namespace marcotest;
echo "TEST";
//phpinfo();
?>
Expected result:
----------------
NO FATAL ERROR...
( Same result as WITHOUT '--enable-zend-multibyte' )
Actual result:
--------------
Fatal error: Encoding declaration pragma must be the very first
statement in the script in /home/mweber/public_html/sub.inc.php on line
2
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50464&edit=1