Skip to content

Commit

Permalink
Update information about PHP 7
Browse files Browse the repository at this point in the history
  • Loading branch information
petk committed Jan 23, 2017
1 parent 3a104a5 commit 05c3400
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions _posts/01-04-01-Mac-Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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

Expand All @@ -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
Expand Down
10 changes: 5 additions & 5 deletions _posts/07-02-01-Databases_MySQL.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ 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]

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].**
Expand Down

0 comments on commit 05c3400

Please sign in to comment.