Exotic names for methods, constants, variables and fields - Bug or Feature?

后端 未结 4 1841
死守一世寂寞
死守一世寂寞 2020-11-28 07:26

after some confusion in the comments to

  • Is it safe to have 1 letter class names in PHP, e.g A, B, C

I thought I make into a question. According

4条回答
  •  清歌不尽
    2020-11-28 07:45

    From my understanding, the current versions of PHP have some unicode support, but it is inconsistent. As others have suggested, this was going to be addressed in PHP6, which was canceled (not postponed). At the end of the day, some "exotic" characters will work, and others won't; and obviously, as you suggested, it is better to stick with A-Za-z0-9_.

    At the same time, I have heard rumors that the unicode discussion was recently restarted, presumably from scratch, as the original proposal for UTF-16 in PHP6 involved tons of effort with very little return.

    Side note: From what I have read, the next major PHP release will be PHP 5.4, which might feature horizontal integration (traits), array shorthand, built-in HTTP server, and some other much needed functionality.

    http://www.mail-archive.com/internals@lists.php.net/msg35720.html

提交回复
热议问题