Last active
August 29, 2015 14:04
-
-
Save do-aki/a652f67d1d73c2837e66 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ php -v | |
PHP 5.5.14 (cli) (built: Jul 23 2014 16:08:06) (DEBUG) | |
Copyright (c) 1997-2014 The PHP Group | |
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies | |
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies | |
with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans | |
$ php -d zend.multibyte=1 -d zend.script_encoding='EUC-JP' aa.php | |
PHP Warning: Unexpected character in input: ' in /tmp/aa.php on line 11 | |
PHP Warning: Unexpected character in input: ' in /tmp/aa.php on line 11 | |
PHP Warning: Unexpected character in input: ' in /tmp/aa.php on line 11 | |
string(6) "EUC-JP" | |
HELLO? | |
[Wed Jul 23 18:25:04 2014] Script: '/tmp/aa.php' | |
/tmp/php-build/source/5.5.14/ext/mbstring/mbstring.c(612) : Freeing 0x7FFC340E65D0 (181 bytes), script=/tmp/aa.php | |
=== Total 1 memory leaks detected === |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ php -v | |
PHP 5.6.0RC2 (cli) (built: Jul 23 2014 16:50:25) (DEBUG) | |
Copyright (c) 1997-2014 The PHP Group | |
Zend Engine v2.6.0-dev, Copyright (c) 1998-2014 Zend Technologies | |
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies | |
with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans | |
$ php -d zend.multibyte=1 -d zend.script_encoding='EUC-JP' aa.php | |
PHP Parse error: syntax error, unexpected '"', expecting variable (T_VARIABLE) or ${ (T_DOLLAR_OPEN_CURLY_BRACES) or {$ (T_CURLY_OPEN) in /tmp/aa.php on line 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(encoding='UTF-8'); | |
var_dump(ini_get('zend.script_encoding')); | |
// あ | |
// い | |
// う | |
echo "HELLO?\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
aa.php は UTF-8
5.5.14 だと 過食、 5.6.0RC2 だと減食。