Web студия "GrandView"
  Главная   Написать Контакты
   
   
О проекте
Руководство php
 

Rules

The following list gives an overview of which rights the PHP project reserves for itself, when choosing names for new internal identifiers. The definitive guide is the official CODING STANDARDS:

  • PHP owns the top-level namespace but tries to find decent descriptive names and avoid any obvious clashes.

  • Function names use underscores between words, while class names use the lower bumpy camel rule (there are some exceptions for older classes and functions).

  • PHP will prefix any global symbols of an extension with the name of the extension. (In the past, there have been numerous exceptions to this rule.) Examples:

  • Iterators and Exceptions are however simply postfixed with "Iterator" and "Exception." Examples:

    • ArrayIterator

    • LogicException

  • PHP reserves all symbols starting with __ as magical. It is recommended that you do not create symbols starting with __ in PHP unless you want to use documented magical functionality. Examples:

    • __get()

    • __autoload()



add a note add a note User Contributed Notes
Rules
Jon at kexsof dot com
22-Oct-2007 05:08
Angst relief for Drupal apprentices:
remember that the prefix (and suffix) for PHP magical symbols
is two (2) underscores.  The Drupal coding standard is one underscore
for some types of programmer-created identifiers.

Tips> <Userland Naming Guide
Last updated: Sat, 27 Jan 2007
 
 
Новости
11 июля 2007
Сайт запущен
© 2007 info@grandviewstudio.com

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 324

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 330
Z058440144362 Z348613067571