From 764ba50b0a78ade2af5f3bf16ec7b2a2d8b72ff7 Mon Sep 17 00:00:00 2001 From: Kris Jordan Date: Mon, 9 Jul 2012 12:59:59 -0400 Subject: [PATCH] Changing order of language highlights section to be more logical. --- _includes/language-highlights.md | 23 ++++++++++++----------- _layouts/default.html | 2 +- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/_includes/language-highlights.md b/_includes/language-highlights.md index 54d6df7..5f7c7d1 100644 --- a/_includes/language-highlights.md +++ b/_includes/language-highlights.md @@ -1,18 +1,8 @@ # Language Highlights -## Namespaces - -As mentioned above, the PHP community has a lot of developers creating lots of code. This means that one library's PHP code may use the same class name as another library. When both libraries are used in the same namespace, they collide and cause trouble. - -_Namespaces_ solve this problem. As described in the PHP reference manual, namespaces may be compared to operating system directories that _namespace_ files; two files with the same name may co-exist in separate directories. Likewise, two PHP classes with the same name may co-exist in separate PHP namespaces. It's as simple as that. - -It is important for you to namespace your code so that it may be used by other developers without fear of colliding with other libraries. - -* [Read about Namespaces][namespaces] - ## Programming Paradigms -PHP is a flexible, dynamic language that supports a variety of techniques. It has evolved dramatically over the years, notably adding a solid object-oriented model in PHP 5.0 (2004), anonymous functions and namespaces in PHP 5.3 (2009), and traits (or mixins) in PHP 5.4 (2012). +PHP is a flexible, dynamic language that supports a variety of programming techniques. It has evolved dramatically over the years, notably adding a solid object-oriented model in PHP 5.0 (2004), anonymous functions and namespaces in PHP 5.3 (2009), and traits (or mixins) in PHP 5.4 (2012). ### Object-oriented Programming @@ -29,6 +19,17 @@ PHP is a flexible, dynamic language that supports a variety of techniques. It ha * [Read about Magic Methods][magic-methods] * [Read about Reflection][reflection] +## Namespaces + +As mentioned above, the PHP community has a lot of developers creating lots of code. This means that one library's PHP code may use the same class name as another library. When both libraries are used in the same namespace, they collide and cause trouble. + +_Namespaces_ solve this problem. As described in the PHP reference manual, namespaces may be compared to operating system directories that _namespace_ files; two files with the same name may co-exist in separate directories. Likewise, two PHP classes with the same name may co-exist in separate PHP namespaces. It's as simple as that. + +It is important for you to namespace your code so that it may be used by other developers without fear of colliding with other libraries. + +* [Read about Namespaces][namespaces] + + ## Standard PHP Library The Standard PHP Library (SPL) is packaged with PHP and provides a collection of classes and interfaces. It is made up primarily of commonly needed datastructure classes (stack, queue, heap, and so on), and iterators which can traverse over these datastructures or your own classes which implement SPL interfaces. diff --git a/_layouts/default.html b/_layouts/default.html index 79eb19e..e2365b2 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -32,8 +32,8 @@
  • Code Style Guide
  • Language Highlights