From 05c3400ef6b175f03450b1fa56af23d3b6504cce Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Mon, 23 Jan 2017 20:56:55 +0100 Subject: [PATCH] Update information about PHP 7 --- _posts/01-04-01-Mac-Setup.md | 10 +++++----- _posts/07-02-01-Databases_MySQL.md | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/_posts/01-04-01-Mac-Setup.md b/_posts/01-04-01-Mac-Setup.md index b9b706e..0e88359 100644 --- a/_posts/01-04-01-Mac-Setup.md +++ b/_posts/01-04-01-Mac-Setup.md @@ -6,7 +6,7 @@ anchor: mac_setup ## Mac Setup {#mac_setup_title} OS X comes prepackaged with PHP but it is normally a little behind the latest stable. Mavericks has 5.4.17, -Yosemite 5.5.9, El Capitan 5.5.29 and Sierra 5.6.24, but with PHP 7.0 out that is often not good enough. +Yosemite 5.5.9, El Capitan 5.5.29 and Sierra 5.6.24, but with PHP 7.1 out that is often not good enough. There are multiple ways to install PHP on OS X. @@ -29,14 +29,14 @@ MacPorts supports pre-compiled binaries, so you don't need to recompile every 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: +At this point, you can install `php54`, `php55`, `php56`, `php70` or `php71` using the `port install` command, for example: sudo port install php56 - sudo port install php70 + sudo port install php71 And you can run `select` command to switch your active PHP: - sudo port select --set php php70 + sudo port select --set php php71 ### Install PHP via phpbrew @@ -45,7 +45,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. +Another popular option is [php-osx.liip.ch] which provides one liner installation methods for versions 5.3 through 7.1. 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/07-02-01-Databases_MySQL.md b/_posts/07-02-01-Databases_MySQL.md index c1d5e55..476ffc9 100644 --- a/_posts/07-02-01-Databases_MySQL.md +++ b/_posts/07-02-01-Databases_MySQL.md @@ -6,7 +6,7 @@ anchor: mysql_extension ## MySQL Extension {#mysql_extension_title} -The [mysql] extension for PHP is incredibly old and has superseded by two other extensions: +The [mysql] extension for PHP is incredibly old and has superseded by two other extensions: - [mysqli] - [pdo] @@ -14,12 +14,12 @@ The [mysql] extension for PHP is incredibly old and has superseded by two other Not only did development stop long ago on [mysql], but it was [deprecated as of PHP 5.5.0] [mysql_deprecated], and **has been [officially removed in PHP 7.0][mysql_removed]**. -To save digging into your `php.ini` settings to see which module you are using, one option is to search for `mysql_*` -in your editor of choice. If any functions such as `mysql_connect()` and `mysql_query()` show up, then `mysql` is +To save digging into your `php.ini` settings to see which module you are using, one option is to search for `mysql_*` +in your editor of choice. If any functions such as `mysql_connect()` and `mysql_query()` show up, then `mysql` is in use. -Even if you are not using PHP 7.0 yet, failing to consider this upgrade as soon as possible will lead to greater -hardship when the PHP 7.0 upgrade does come about. The best option is to replace mysql usage with [mysqli] or [PDO] in +Even if you are not using PHP 7.x yet, failing to consider this upgrade as soon as possible will lead to greater +hardship when the PHP 7.x upgrade does come about. The best option is to replace mysql usage with [mysqli] or [PDO] in your applications within your own development schedules so you won't be rushed later on. **If you are upgrading from [mysql] to [mysqli], beware lazy upgrade guides that suggest you can simply find and replace `mysql_*` with `mysqli_*`. Not only is that a gross oversimplification, it misses out on the advantages that mysqli provides, such as parameter binding, which is also offered in [PDO][pdo].**