diff --git a/_posts/01-02-01-Use-the-Current-Stable-Version.md b/_posts/01-02-01-Use-the-Current-Stable-Version.md index d8d5881..1edc3ec 100644 --- a/_posts/01-02-01-Use-the-Current-Stable-Version.md +++ b/_posts/01-02-01-Use-the-Current-Stable-Version.md @@ -5,7 +5,7 @@ isChild: true ## Use the Current Stable Version (5.5) {#use_the_current_stable_version_55_title} -If you are just getting started with PHP make sure to start with the current stable release of [PHP 5.5][php-release]. PHP has made great strides adding powerful [new features](#language_highlights) over the last few years. Don't let the minor version number difference between 5.2 and 5.5 fool you, it represents _major_ improvements. If you are looking for a function or it's usage, the documentation on the [php.net][php-docs] website will have the answer. +If you are just getting started with PHP make sure to start with the current stable release of [PHP 5.5][php-release]. PHP has made great strides adding powerful [new features](#language_highlights) over the last few years. Don't let the minor version number difference between 5.2 and 5.5 fool you, it represents _major_ improvements. If you are looking for a function or its usage, the documentation on the [php.net][php-docs] website will have the answer. [php-release]: http://www.php.net/downloads.php [php-docs]: http://www.php.net/manual/en/ diff --git a/_posts/02-01-01-Code-Style-Guide.md b/_posts/02-01-01-Code-Style-Guide.md index 1cd16f9..3cd3fbb 100644 --- a/_posts/02-01-01-Code-Style-Guide.md +++ b/_posts/02-01-01-Code-Style-Guide.md @@ -24,7 +24,7 @@ You can use [PHP_CodeSniffer][phpcs] to check code against any one of these reco like [Sublime Text 2][st-cs] to be given real time feedback. Use Fabien Potencier's [PHP Coding Standards Fixer][phpcsfixer] to automatically modify your code syntax so that it -conforms with these standards, saving you from fixing each problem by hand. +conforms to these standards, saving you from fixing each problem by hand. English is preferred for all symbol names and code infrastructure. Comments may be written in any language easily readable by all current and future parties who may be working on the codebase. diff --git a/_posts/03-02-01-Programming-Paradigms.md b/_posts/03-02-01-Programming-Paradigms.md index eb0d567..2da54d9 100644 --- a/_posts/03-02-01-Programming-Paradigms.md +++ b/_posts/03-02-01-Programming-Paradigms.md @@ -18,7 +18,7 @@ interfaces, inheritance, constructors, cloning, exceptions, and more. ### Functional Programming -PHP supports first-class function, meaning that a function can be assigned to a variable. Both user defined and built-in +PHP supports first-class function, meaning that a function can be assigned to a variable. Both user-defined and built-in functions can be referenced by a variable and invoked dynamically. Functions can be passed as arguments to other functions (feature called Higher-order functions) and function can return other functions. @@ -39,7 +39,7 @@ can be used interchangeably with anonymous functions in almost all cases. ### Meta Programming -PHP supports various forms of meta programming through mechanisms like the Reflection API and Magic Methods. There are +PHP supports various forms of meta-programming through mechanisms like the Reflection API and Magic Methods. There are many Magic Methods available like `__get()`, `__set()`, `__clone()`, `__toString()`, `__invoke()`, etc. that allow developers to hook into class behavior. Ruby developers often say that PHP is lacking `method_missing`, but it is available as `__call()` and `__callStatic()`. diff --git a/_posts/03-05-01-Command-Line-Interface.md b/_posts/03-05-01-Command-Line-Interface.md index c323dc1..7b032f2 100644 --- a/_posts/03-05-01-Command-Line-Interface.md +++ b/_posts/03-05-01-Command-Line-Interface.md @@ -32,7 +32,7 @@ echo "Hello, $name\n"; PHP sets up two special variables based on the arguments your script is run with. [`$argc`][argc] is an integer variable containing the argument *count* and [`$argv`][argv] is an array variable containing each argument's *value*. The first argument is always the name of your PHP script file, in this case `hello.php`. -The `exit()` expression is used with a non zero number to let the shell know that the command failed. Commonly used exit codes can be found [here][exit-codes] +The `exit()` expression is used with a non-zero number to let the shell know that the command failed. Commonly used exit codes can be found [here][exit-codes] To run our script, above, from the command line: diff --git a/_posts/04-03-01-PEAR.md b/_posts/04-03-01-PEAR.md index b48fa44..f5315a8 100644 --- a/_posts/04-03-01-PEAR.md +++ b/_posts/04-03-01-PEAR.md @@ -5,7 +5,7 @@ isChild: true ## PEAR {#pear_title} Another veteran package manager that many PHP developers enjoy is [PEAR][1]. It behaves much the same way as Composer, -but has some noteable differences. +but has some notable differences. PEAR requires each package to have a specific structure, which means that the author of the package must prepare it for usage with PEAR. Using a project which was not prepared to work with PEAR is not possible. @@ -19,8 +19,8 @@ if version conflicts between two projects arise. You can install PEAR by downloading the phar installer and executing it. The PEAR documentation has detailed [install instructions][2] for every operating system. -If you are using Linux, you can also have a look at your distribution package manager. Debian and Ubuntu for example -have a apt ``php-pear`` package. +If you are using Linux, you can also have a look at your distribution package manager. Debian and Ubuntu, for example, +have an apt ``php-pear`` package. ### How to install a package diff --git a/_posts/06-01-01-Databases.md b/_posts/06-01-01-Databases.md index ce47ec4..5f024fa 100644 --- a/_posts/06-01-01-Databases.md +++ b/_posts/06-01-01-Databases.md @@ -57,7 +57,7 @@ database preventing potential SQL injection attacks. You should also be aware that database connections use up resources and it was not unheard-of to have resources exhausted if connections were not implicitly closed, however this was more common in other languages. Using PDO you can implicitly close the connection by destroying the object by ensuring all remaining references to it are deleted, -ie. set to NULL. If you don't do this explicitly, PHP will automatically close the connection when your script ends +i.e. set to NULL. If you don't do this explicitly, PHP will automatically close the connection when your script ends - unless of course you are using persistent connections. * [Learn about PDO connections][5] diff --git a/_posts/07-03-01-Exceptions.md b/_posts/07-03-01-Exceptions.md index 56311b6..f5d68c3 100644 --- a/_posts/07-03-01-Exceptions.md +++ b/_posts/07-03-01-Exceptions.md @@ -17,7 +17,7 @@ obvious. Another problem is when classes automatically throw an error to the screen and exit the process. When you do this you stop another developer from being able to dynamically handle that error. Exceptions should be thrown to make a developer aware -of an error, then they can choose how to handle this. E.g: +of an error; they then can choose how to handle this. E.g.: {% highlight php %} = 5.3.7. -Below we hash a string, we then check the hash against a new string. Because our two source strings are different ('secret-password' vs. 'bad-password') this login will fail. +Below we hash a string, and then check the hash against a new string. Because our two source strings are different ('secret-password' vs. 'bad-password') this login will fail. {% highlight php %}