CARVIEW |
Select Language
HTTP/2 200
server: myracloud
date: Mon, 13 Oct 2025 02:23:21 GMT
content-type: text/html; charset=utf-8
content-length: 2788
vary: accept-encoding
content-encoding: gzip
expires: Mon, 13 Oct 2025 02:23:21 GMT
cache-control: max-age=0
etag: "myra-e1b27b7f"
php.internals: Re: Flexible function naming
Re: Flexible function naming
From: Michael Wallner Date: Sat, 14 Dec 2013 08:23:29 +0000 Subject: Re: Flexible function naming References: 1 Groups: php.internals Request: Send a blank email to internals+get-70635@lists.php.net to get a copy of this message
On Dec 14, 2013 7:45 AM, "Robert Cerny" <robert@cerny-online.com> wrote: > > Hello, > > I am new to the list. I have been a PHP user for 8 years. I am a progammer for 30 years. Initially i wanted to post this as an RFC, but could not figure out how to register. When accessing [1] i get 'Command disabled: register'. I did some research, but the archives are vast, so please accept my apologies in advance if this has already been discussed. Yes one cannot register. > When a PHP code base is growing over time it looks more and more 'diverse', because of inconsistent function and method naming in core PHP and third party libraries. This cannot be changed by any guidelines. The author of a function has the freedom to assign any name. The user of a function needs some flexibility in referring to a function. It should be possible to use 'array_key_exists', 'arrayKeyExists' or 'arraykeyExists'. Because of the performance impact and possible resolution conflicts this language feature needs to be disabled by default. Oh, I think this is not the best example, but in 5.6 you can achieve that with the new 'use function' feature. > This is not difficult to implement. It is only necessary to normalize function names: remove all but leading underscores and lower case the result. The likelihood of conflict is very small. > > This small change would allow coding teams to create a consistent code base based on 'their' guidelines. Motto: "Have it your way!". No. > > Best regards, > > Robert Cerny > > [1] https://wiki.php.net/start?do=register
Thread (14 messages)
« previous | php.internals (#70635) | next » |
---|