|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-12-13 01:00 UTC] marco dot weber at uni-trier dot de
[2009-12-13 15:18 UTC] svn@php.net
[2009-12-13 15:19 UTC] felipe@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 22:00:01 2025 UTC |
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