|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #66668 Function names are case-sensitive for chars with codes 127-255
Submitted: 2014-02-07 20:54 UTC Modified: -
Avg. Score:1.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: mail at mkharitonov dot net Assigned:
Status: Open Package: Documentation problem
PHP Version: 5.5.9 OS: Mac OS X 10.8.5
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
39 - 16 = ?
Subscribe to this entry?

 [2014-02-07 20:54 UTC] mail at mkharitonov dot net
Manual page:

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:
/* File charset is "windows-1251" */
function english() { print 'ok '; }

function кириллица() { print 'ok '; }

Expected result:
ok ok ok ok 

Actual result:
ok ok ok 
Fatal error: Call to undefined function КИРИЛЛИЦА() in ... on line 9


UserDefinedFunctions_doc_patch (last revision 2019-09-25 21:29 UTC by shetty dot bhavya345 at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-03-06 14:19 UTC] 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:

    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.
 [2019-09-25 21:29 UTC] shetty dot bhavya345 at gmail dot com
The following patch has been added/updated:

Patch Name: UserDefinedFunctions_doc_patch
Revision:   1569446978
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Apr 04 19:01:23 2020 UTC