diff --git a/_posts/01-04-01-Mac-Setup.md b/_posts/01-04-01-Mac-Setup.md index c496f25..16e015d 100644 --- a/_posts/01-04-01-Mac-Setup.md +++ b/_posts/01-04-01-Mac-Setup.md @@ -26,7 +26,7 @@ command-line, X11 or Aqua based open-source software on the OS X operating system. MacPorts supports pre-compiled binaries, so you don't need to recompile every -dependencies from the source tarball files, it saves your life if you don't +dependency from the source tarball files, it saves your life if you don't have any package installed on your system. At this point, you can install `php54`, `php55`, `php56` or `php70` using the `port install` command, for example: @@ -34,7 +34,7 @@ At this point, you can install `php54`, `php55`, `php56` or `php70` using the `p sudo port install php56 sudo port install php70 -And you can run `select` command to switch your active php: +And you can run `select` command to switch your active PHP: sudo port select --set php php70 @@ -46,7 +46,7 @@ applications/projects require different versions of PHP, and you are not using v ### Install PHP via Liip's binary installer Another popular option is [php-osx.liip.ch] which provides one liner installation methods for versions 5.3 through 7.0. -It doesn't overwrite the php binaries installed by Apple, but installs everything in a separate location (/usr/local/php5). +It doesn't overwrite the PHP binaries installed by Apple, but installs everything in a separate location (/usr/local/php5). ### Compile from Source diff --git a/_posts/01-05-01-Windows-Setup.md b/_posts/01-05-01-Windows-Setup.md index e916c91..1435ed7 100644 --- a/_posts/01-05-01-Windows-Setup.md +++ b/_posts/01-05-01-Windows-Setup.md @@ -7,13 +7,13 @@ anchor: windows_setup You can download the binaries from [windows.php.net/download][php-downloads]. After the extraction of PHP, it is recommended to set the [PATH][windows-path] to the root of your PHP folder (where php.exe is located) so you can execute PHP from anywhere. -For learning and local development you can use the built in webserver with PHP 5.4+ so you don't need to worry about +For learning and local development, you can use the built in webserver with PHP 5.4+ so you don't need to worry about configuring it. If you would like an "all-in-one" which includes a full-blown webserver and MySQL too then tools such as the [Web Platform Installer][wpi], [XAMPP][xampp], [EasyPHP][easyphp], [OpenServer][openserver] and [WAMP][wamp] will help get a Windows development environment up and running fast. That said, these tools will be a little different from production so be careful of environment differences if you are working on Windows and deploying to Linux. -If you need to run your production system on Windows then IIS7 will give you the most stable and best performance. You +If you need to run your production system on Windows, then IIS7 will give you the most stable and best performance. You can use [phpmanager][phpmanager] (a GUI plugin for IIS7) to make configuring and managing PHP simple. IIS7 comes with FastCGI built in and ready to go, you just need to configure PHP as a handler. For support and additional resources there is a [dedicated area on iis.net][php-iis] for PHP. diff --git a/_posts/03-03-01-Namespaces.md b/_posts/03-03-01-Namespaces.md index 55030aa..dc6084e 100644 --- a/_posts/03-03-01-Namespaces.md +++ b/_posts/03-03-01-Namespaces.md @@ -24,7 +24,7 @@ In October 2014 the PHP-FIG deprecated the previous autoloading standard: [PSR-0 many PHP 5.2-only projects currently implement PSR-0. Luckily those PHP 5.2-only projects are starting to up their version requirements, meaning PSR-0 is being used less and less. -If you're going to use an autoloader standard for a new application or package then you almost certainly want +If you're going to use an autoloader standard for a new application or package, then you almost certainly want to look into PSR-4. * [Read about Namespaces][namespaces] diff --git a/_posts/04-02-01-Composer-and-Packagist.md b/_posts/04-02-01-Composer-and-Packagist.md index 553e57f..10e1f6f 100644 --- a/_posts/04-02-01-Composer-and-Packagist.md +++ b/_posts/04-02-01-Composer-and-Packagist.md @@ -79,7 +79,7 @@ as a dependency of your project. composer require twig/twig:~1.8 {% endhighlight %} -Alternatively the `composer init` command will guide you through creating a full `composer.json` file +Alternatively, the `composer init` command will guide you through creating a full `composer.json` file for your project. Either way, once you've created your `composer.json` file you can tell Composer to download and install your dependencies into the `vendor/` directory. This also applies to projects you've downloaded that already provide a `composer.json` file: @@ -106,7 +106,7 @@ first ran `composer install`. If you share your project with other coders and th is part of your distribution, when they run `composer install` they'll get the same versions as you. To update your dependencies, run `composer update`. -This is most useful when you define your version requirements flexibly. For instance a version +This is most useful when you define your version requirements flexibly. For instance, a version requirement of `~1.8` means "anything newer than `1.8.0`, but less than `2.0.x-dev`". You can also use the `*` wildcard as in `1.8.*`. Now Composer's `composer update` command will upgrade all your dependencies to the newest version that fits the restrictions you define. diff --git a/_posts/04-03-01-PEAR.md b/_posts/04-03-01-PEAR.md index 3c9af2a..997586d 100644 --- a/_posts/04-03-01-PEAR.md +++ b/_posts/04-03-01-PEAR.md @@ -57,7 +57,7 @@ handle your PEAR dependencies. This example will install code from `pear2.php.ne {% endhighlight %} The first section `"repositories"` will be used to let Composer know it should "initialize" (or "discover" in PEAR -terminology) the pear repo. Then the require section will prefix the package name like this: +terminology) the pear repo. Then the required section will prefix the package name like this: > pear-channel/Package diff --git a/_posts/05-02-01-The-Basics.md b/_posts/05-02-01-The-Basics.md index 458c670..dd5fc28 100644 --- a/_posts/05-02-01-The-Basics.md +++ b/_posts/05-02-01-The-Basics.md @@ -6,7 +6,7 @@ anchor: the_basics ## The Basics {#the_basics_title} PHP is a vast language that allows coders of all levels the ability to produce code not only quickly, but efficiently. -However while advancing through the language, we often forget the basics that we first learnt (or overlooked) in favor +However, while advancing through the language, we often forget the basics that we first learnt (or overlooked) in favor of short cuts and/or bad habits. To help combat this common issue, this section is aimed at reminding coders of the basic coding practices within PHP. diff --git a/_posts/05-05-01-PHP-and-UTF8.md b/_posts/05-05-01-PHP-and-UTF8.md index de0d659..b734d3b 100644 --- a/_posts/05-05-01-PHP-and-UTF8.md +++ b/_posts/05-05-01-PHP-and-UTF8.md @@ -18,7 +18,7 @@ for a brief, practical summary. ### UTF-8 at the PHP level The basic string operations, like concatenating two strings and assigning strings to variables, don't need anything -special for UTF-8. However most string functions, like `strpos()` and `strlen()`, do need special consideration. These +special for UTF-8. However, most string functions, like `strpos()` and `strlen()`, do need special consideration. These functions often have an `mb_*` counterpart: for example, `mb_strpos()` and `mb_strlen()`. These `mb_*` strings are made available to you via the [Multibyte String Extension], and are specifically designed to operate on Unicode strings. diff --git a/_posts/06-03-01-Complex-Problem.md b/_posts/06-03-01-Complex-Problem.md index 0d6f907..c64e723 100644 --- a/_posts/06-03-01-Complex-Problem.md +++ b/_posts/06-03-01-Complex-Problem.md @@ -10,7 +10,7 @@ If you have ever read about Dependency Injection then you have probably seen the ### Inversion of Control -Inversion of Control is as it says, "inverting the control" of a system by keeping organisational control entirely +Inversion of Control is as it says, "inverting the control" of a system by keeping organizational control entirely separate from our objects. In terms of Dependency Injection, this means loosening our dependencies by controlling and instantiating them elsewhere in the system. diff --git a/_posts/07-04-01-Interacting-via-Code.md b/_posts/07-04-01-Interacting-via-Code.md index 78d4f4b..5cae4f0 100644 --- a/_posts/07-04-01-Interacting-via-Code.md +++ b/_posts/07-04-01-Interacting-via-Code.md @@ -19,7 +19,7 @@ foreach ($db->query('SELECT * FROM table') as $row) { {% endhighlight %} -This is bad practice for all sorts of reasons, mainly that its hard to debug, hard to test, hard to read and it is +This is bad practice for all sorts of reasons, mainly that it's hard to debug, hard to test, hard to read and it is going to output a lot of fields if you don't put a limit on there. While there are many other solutions to doing this - depending on if you prefer [OOP](/#object-oriented-programming) or diff --git a/_posts/10-03-01-Password-Hashing.md b/_posts/10-03-01-Password-Hashing.md index ee70a65..d1694e6 100644 --- a/_posts/10-03-01-Password-Hashing.md +++ b/_posts/10-03-01-Password-Hashing.md @@ -8,8 +8,8 @@ anchor: password_hashing Eventually everyone builds a PHP application that relies on user login. Usernames and passwords are stored in a database and later used to authenticate users upon login. -It is important that you properly [_hash_][3] passwords before storing them. Password hashing is an irreversible, one -way function performed against the user's password. This produces a fixed-length string that cannot be feasibly +It is important that you properly [_hash_][3] passwords before storing them. Password hashing is an irreversible, +one-way function performed against the user's password. This produces a fixed-length string that cannot be feasibly reversed. This means you can compare a hash against another to determine if they both came from the same source string, but you cannot determine the original string. If passwords are not hashed and your database is accessed by an unauthorized third-party, all user accounts are now compromised. Some users may (unfortunately) use the same password diff --git a/_posts/10-05-01-Configuration-Files.md b/_posts/10-05-01-Configuration-Files.md index afb7c0b..2e30846 100644 --- a/_posts/10-05-01-Configuration-Files.md +++ b/_posts/10-05-01-Configuration-Files.md @@ -14,4 +14,4 @@ via the file system. that, even if the script is accessed directly, it will not be output as plain text. - Information in configuration files should be protected accordingly, either through encryption or group/user file system permissions. -- It is a good idea to ensure that you do not commit configuration files containing sensitive information eg passwords or API tokens to source control. +- It is a good idea to ensure that you do not commit configuration files containing sensitive information e.g. passwords or API tokens to source control. diff --git a/_posts/12-04-01-Shared-Servers.md b/_posts/12-04-01-Shared-Servers.md index f33127a..828eb4f 100644 --- a/_posts/12-04-01-Shared-Servers.md +++ b/_posts/12-04-01-Shared-Servers.md @@ -9,6 +9,6 @@ PHP has shared servers to thank for its popularity. It is hard to find a host wi the latest version. Shared servers allow you and other developers to deploy websites to a single machine. The upside to this is that it has become a cheap commodity. The downside is that you never know what kind of a ruckus your neighboring tenants are going to create; loading down the server or opening up security holes are the main concerns. If -your project's budget can afford to avoid shared servers you should. +your project's budget can afford to avoid shared servers, you should. To make sure your shared servers are offering the latest versions of PHP, check out [PHP Versions](http://phpversions.info/shared-hosting/). diff --git a/_posts/16-09-01-Videos.md b/_posts/16-09-01-Videos.md index 35e961b..7cdbd6f 100644 --- a/_posts/16-09-01-Videos.md +++ b/_posts/16-09-01-Videos.md @@ -6,7 +6,7 @@ title: Video Tutorials ## Video Tutorials {#videos} -### Youtube Channels +### YouTube Channels * [PHP Academy](https://www.youtube.com/user/phpacademy) * [The New Boston](https://www.youtube.com/user/thenewboston) * [Sherif Ramadan](https://www.youtube.com/user/businessgeek) diff --git a/_posts/17-02-01-User-Groups.md b/_posts/17-02-01-User-Groups.md index 97c062b..7fcd668 100644 --- a/_posts/17-02-01-User-Groups.md +++ b/_posts/17-02-01-User-Groups.md @@ -7,7 +7,7 @@ anchor: user_groups If you live in a larger city, odds are there's a PHP user group nearby. You can easily find your local PUG at the [usergroup-list at php.net][php-uglist] which is based upon [PHP.ug][php-ug]. Alternate sources might be -[Meetup.com][meetup] or a search for ```php user group near me``` using your favourite search engine +[Meetup.com][meetup] or a search for ```php user group near me``` using your favorite search engine (i.e. [Google][google]). If you live in a smaller town, there may not be a local PUG; if that's the case, start one! Special mention should be made of two global user groups: [NomadPHP] and [PHPWomen]. [NomadPHP] offers twice monthly