For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > November 2005 > #34789 [Opn]: userland naming guide









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author #34789 [Opn]: userland naming guide
lsmith@php.net

2005-11-25, 7:55 am

ID: 34789
User updated by: lsmith@php.net
Reported By: lsmith@php.net
Status: Open
Bug Type: Documentation problem
Operating System: irrlevant
PHP Version: Irrelevant
New Comment:

I have begun writing a guide over here:
http://oss.backendmedia.com/UserlandNamingGuide


Previous Comments:
------------------------------------------------------------------------

[2005-11-25 09:57:37] lsmith@php.net

actually we probably need to say that anything that goes into the
global namespace needs to be prefixed by a fairly random (hopefully
unique within the php community) 3-4 letter prefix or breakage is to be
expected ..

see the recent issues with the File and Date objects

------------------------------------------------------------------------

[2005-10-13 11:49:53] vrana@php.net

In language/oop.xml is already mentioned this:

"PHP reserves all function names starting with __ as magical. It is
recommended that you do not use function names with __ in PHP unless
you want some documented magic functionality."

------------------------------------------------------------------------

[2005-10-08 12:51:58] lsmith@php.net

Description:
------------
We need a guide that explains users how to name their userland
functions, classes, exceptions etc without conflicting with future
versions of php (or atleast keeping the risk low) ..

so we will state the obvious like that we usually prefix extension
stuff with the name of the extensions .. but also that we postfix
iterators and exceptions with "Iterator" and "Exception" ..



------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=34789&edit=1
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com