Bug #67681 [Com]: declare(encoding='UTF-8') causes "Warning: Unexpected character in input"

From: Date: Sun, 18 Jun 2017 11:58:23 +0000
Subject: Bug #67681 [Com]: declare(encoding='UTF-8') causes "Warning: Unexpected character in input"
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-209572@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67681&edit=1 ID: 67681 Comment by: qdinar at gmail dot com Reported by: dqneoo at gmail dot com Summary: declare(encoding='UTF-8') causes "Warning: Unexpected character in input" Status: Verified Type: Bug Package: Scripting Engine problem Operating System: Linux PHP Version: PHP5.4,5.5,5.6,5.7dev Block user comment: N Private report: N New Comment: i have same problem with php 5.5.34. but problem appears at last line of script, and i had not ending "?>" . when i put it, warning disappeared. Previous Comments: ------------------------------------------------------------------------ [2014-07-25 05:08:51] yohgaki@php.net When zend.multibyte became runtime option, it was messed up. Related to zend multibyte XFAIL tests in mbstring. ------------------------------------------------------------------------ [2014-07-25 00:29:25] dqneoo at gmail dot com specify php version ------------------------------------------------------------------------ [2014-07-25 00:27:43] dqneoo at gmail dot com Description: ------------ declare(encoding='UTF-8'); causes Warning under the environment of zend.multibyte=On and mbstring.internal_encoding="EUC_JP" Test script: --------------- a.php ----- <?php declare(encoding='UTF-8'); // あああ ----- $ ./configure --enable-mbstring --enable-debug $ make $ ./sapi/cli/php -d zend.multibyte=On -d mbstring.internal_encoding="EUC_JP" a.php Expected result: ---------------- No warnings Actual result: -------------- Warning: Unexpected character in input: ' in /home/vagrant/src/php-src/a.php on line 4 Warning: Unexpected character in input: ' in /home/vagrant/src/php-src/a.php on line 4 Warning: Unexpected character in input: ' in /home/vagrant/src/php-src/a.php on line 4 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67681&edit=1

« previous php.bugs (#209572) next »