mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Warn users about the perils of multi-byte strings and direct character access.
Or, as xkcd put it today, if it starts pointing toward space you are having a bad problem and you will not go to space today. Fixes doc bug #63079 (String access by character is not multibyte-safe). git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@328351 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
3ee6fa8a65
commit
13995e9311
1 changed files with 9 additions and 0 deletions
|
@ -763,6 +763,15 @@ echo "I'd like an {${beers::$ale}}\n";
|
|||
</simpara>
|
||||
</warning>
|
||||
|
||||
<warning>
|
||||
<simpara>
|
||||
Internally, PHP strings are byte arrays. As a result, accessing or
|
||||
modifying a string using array brackets is not multi-byte safe, and
|
||||
should only be done with strings that are in a single-byte encoding such
|
||||
as ISO-8859-1.
|
||||
</simpara>
|
||||
</warning>
|
||||
|
||||
<example>
|
||||
<title>Some string examples</title>
|
||||
<programlisting role="php">
|
||||
|
|
Loading…
Reference in a new issue