Doc #66668 [Opn->Csd]: Function names are case-sensitive for chars with codes 127-255
| From: | cmb@php.net | Date: | Mon, 13 Apr 2020 16:03:22 +0000 |
| Subject: | Doc #66668 [Opn->Csd]: Function names are case-sensitive for chars with codes 127-255 | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-17484@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66668&edit=1
ID: 66668
Updated by: cmb@php.net
Reported by: mail at mkharitonov dot net
Summary: Function names are case-sensitive for chars with
codes 127-255
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
Operating System: Mac OS X 10.8.5
PHP Version: 5.5.9
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
Previous Comments:
------------------------------------------------------------------------
[2020-04-13 16:03:00] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=349655
Log: Fix #66668: Function names are case-sensitive for chars with codes 127-255
------------------------------------------------------------------------
[2019-09-25 21:29:38] shetty dot bhavya345 at gmail dot com
The following patch has been added/updated:
Patch Name: UserDefinedFunctions_doc_patch
Revision: 1569446978
URL: https://bugs.php.net/patch-display.php?bug=66668&patch=UserDefinedFunctions_doc_patch&revision=1569446978
------------------------------------------------------------------------
[2014-03-06 14:19:10] narf at devilix dot net
I can't actually reproduce the described behavior, because it triggers a syntax error on my
setup.
Anyway, character sets can't be auto-magically guessed (not to mention that they can be mixed),
so you can't expect case-sensitivity to work out of the box like that. However, the following
should work:
<?php
declare(encoding='WINDOWS-1251'); // assuming this is the file character set
function ÑеÑÑ() { echo "ok\n"; }
ÑеÑÑ();
ТÐСТ();
It doesn't. As I said - it triggers a syntax error for me and doesn't recognize the
characters at all.
------------------------------------------------------------------------
[2014-02-07 20:54:34] mail at mkharitonov dot net
Description:
------------
Manual page: http://www.php.net/manual/en/functions.user-defined.php
Actual text: "Function names are case-insensitive, ...".
Expected text: "Function names are case-insensitive for A-Z chars and case-sensitive for chars
with codes from 127 through 255 (0x7f-0xff), ...".
Test script:
---------------
<?php
/* File charset is "windows-1251" */
function english() { print 'ok '; }
english();
ENGLISH();
function киÑиллиÑа() { print 'ok '; }
киÑиллиÑа();
ÐÐÐ ÐÐÐÐЦÐ();
Expected result:
----------------
ok ok ok ok
Actual result:
--------------
ok ok ok
Fatal error: Call to undefined function ÐÐÐ ÐÐÐÐЦÐ() in ... on line 9
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66668&edit=1