Coding standards are guidelines, generally stylistic, that give source code universal qualities. These universal qualities make the code more compatible, maintainable, and readable than it would otherwise be. Some coding standards form among the wider communities center on a particular language, such as PHP. Other coding standards are specific to development teams.
PHP is a type of programming language. While Rasmus Lerdorf originally conceived this widely used scripting language for web development, it has since grown into a more versatile tool. The language’s popularity has given rise to a set of coding standards that have become widely accepted. However, there are platforms that make use of PHP, such as the Drupal content management system, that set forth their own coding standard. These various coding standards can make it difficult for the PHP coder.
The default form of a beginning PHP code tag is “< ?PHP” and it is given closure using “?>”, minus the quotes. However, the shorthand form of “” has become the preferred coding standard. Nevertheless, in order to avoid conflicts, the popular platform Drupal requires PHP code blocks opened with the traditional “< ?PHP”. To further confuse matters, as of Drupal 4.7, a closing tag, “?>”, at the end of a file is purposefully omitted. This is an inconsistent problem across PHP-using platforms that cause coders to keep track of the differences.