Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Medium.com:
Upcoming changes in PHP 7.1
May 16, 2016 @ 11:45:32

In this article on Medium.com Amo Chohan covers some of the changes that are coming to the language in PHP 7.1.

Below are the key changes that will be introduced (or removed) in PHP 7.1. For a full list, and to see which changes are being discussed, check out the official PHP RFC.

Included in the list of updates/additions are things like:

  • Catching multiple exception types
  • Support class constant visibility
  • Void return types
  • Warn about invalid strings in arithmetic
  • Deprecate and remove mcrypt()

He then goes through some of the complete list and provides a brief overview of the change and some code samples where appropriate.

tagged: changes php71 features deprecation examples addition

Link: https://dotdev.co/upcoming-changes-in-php-7-1-76ebea53b820#.ynausa1pm

SitePoint PHP Blog:
An Overview of PHPUnit 5 – What’s New? What’s Coming?
May 10, 2016 @ 09:24:37

On the SitePoint PHP blog there's an article posted talking about the next major version of the PHPUnit unit testing tool - PHPUnit 5. It talks about what's new, what's changed and what has been added to help make your testing more effective.

It was January 2016 when the PHPUnit development team [announced](https://github.com/sebastianbergmann/phpunit/wiki/Release-Announcement-for-PHPUnit-5.0.0) the release of PHPUnit 5.0.

While several minor version have already been released since, PHPUnit’s major version 5 has introduced several new functionalities and deprecated a few others. In this article, we’ll take a look at the most notable changes.

Included in the list of changes the article mentions are things like:

  • the bump up the minimum PHP version requirements (5.6+)
  • new assertion methods
  • deep object cloning
  • passing mocks along with expectations

Several more are included and, with each some code examples or links to other resources for more information.

tagged: phpunit5 overview preview release features changes update

Link: http://www.sitepoint.com/an-overview-of-phpunit-5-whats-new-whats-coming/

SitePoint PHP Blog:
What Is Laravel Valet, and Why All the Fuss?
May 09, 2016 @ 13:29:09

The SitePoint PHP blog has posted an article adding to some of the others about the recently released Laravel Valet tool, providing an overview of the product and what it has to offer.

Valet is a tool which makes spinning up demo or discardable projects a breeze.

It’s a tool which combines some of the default software on OS X with some ideas about filepaths and serving of PHP apps, and some additional tools for skipping the need to modify the /etc/hosts file. Additionally, it allows for forwarding of access to the local application over the public internet when needed.

Unlike Vagrant or Docker It offers no isolation, making all apps use the same globally available software. Why this is important to note will be explained below.

The post then gets into some of "the particulars" the tool has to offer, essentially the "lock in" requirements:

  • OS X only
  • Shared system state (no VMs, only global)
  • Automatic virtual host
  • No dev / prod parity
  • Vendor-lock (with a caveat)
  • Live self-hosted preview

They point out that while Laravel Valet can be a handy tool if this is the tooling and setup you're looking for, it might not be for everyone.

tagged: laravel valet summary overview features requirements

Link: http://www.sitepoint.com/what-is-laravel-valet-and-why-all-the-fuss/

AppDynamics PHP Blog:
Predicting the Future of PHP Security – Part 3
Mar 24, 2016 @ 09:30:15

On the AppDynamics blog there's a post from Omed Habib where he looks at the current state of security in the PHP language and makes predictions about the future of it in PHP and where the language might be heading.

In some ways security is an infinite game of chess on a board the size of the world. For every move you make, the hackers have a countermove ready. They are highly motivated to take what you have, so the game never ends; it just switches players once in awhile. In this final blog in the series, we are going to review the game board, with a look at the most recent changes to security in PHP 7 and earlier supported versions. Then, we’ll try to look a few moves ahead with predictions for the future of PHP security.

In the article he talks about PHP's popularity and how it has somewhat worked against it and its reputation when it comes to secure development. He covers PHP 7 and some of the security-related updates that came with it including:

  • whitelisting classes on unserialize
  • the cryptographically secure random number generator
  • patches for buffer overflows and memory leaks

He ends the post looking at a possible future of the language based on comments made in this other article., suggesting that one possible place for the language to head is into the IoT (Internet of Things) space and interacting with the devices on the other end.

tagged: predictions security language php7 features patches iot direction

Link: https://blog.appdynamics.com/php/predicting-the-future-of-php-security/

Toptal Blog:
Introduction To PHP 7: What's New And What's Gone
Mar 14, 2016 @ 12:04:12

The Toptal blog has a new post talking about PHP 7 including some of the new things it includes (and what's gone from previous versions of the language).

One of the most exciting events in 2015 in the PHP world was the release of PHP 7, 10 years on from the release of the last major version, PHP 5. With a major step forward, PHP 7 introduces plenty of new features and performance upgrades. [...] This guide should serve as a quick tour on what to expect if you plan on moving your existing applications, or building new ones, on top of PHP 7.

He starts with a topic quite a few people wondered about - "where did PHP 6 go?". Following this he gets into some of the performance boosts that PHP 7 brings with it and updates to the "syntactic sugar" it offers developers to make their lives easier. He then gets in to the new features in this version like:

  • Scalar Parameter Types & Return Type Hints
  • Engine Exceptions
  • Anonymous Classes
  • CSPRNG Functions
  • Unicode Codepoint Escape Syntax

He finishes off the article looking at the migration from PHP 5 to PHP 7 and highlights some of the potential compatibility issues that could pop up during the migration.

tagged: php7 introduction features compatibility overview language php5

Link: https://www.toptal.com/php/php-7-performance-features

Freek Van der Herten:
A modern backup solution for Laravel apps
Mar 09, 2016 @ 11:15:54

As Freek Van der Herten mentions in this post to his site the latest release of the Laravel backup package has been released - version 3 - with some major improvements over previous releases.

Today our team released a new major version of laravel-backup. It can backup the files and databases of your application to one or more external filesystems. It uses Laravel’s native cloud filesystem to do this. The package can also notify you via Slack and/or email when something goes wrong with your backups. We’ve also created a dedicated site with full documentation. In this blogpost we want to give you some background of why and how the package was created.

They start out with a bit of history about the package, talking about how they created it to fill their own needs and how its risen in popularity since its release. Following this the post talks about new features in version 3 including:

  • Taking backups
  • Cleaning up old backups
  • Monitoring the health of all backups
  • Sending notifications

There's also some brief mentions of other new features around event hooks and adding additional information to the backup file. There's a bit of code shared to show the quality/readbility of the code and links over to various resources on the documentation site as well. Finally they mention some information about the use of the package in PHP 5 (it has become PHP 7 focused with this release) and some of the alternatives that are out there.

tagged: backup laravel package php7 release improvement features history php5

Link: https://murze.be/2016/03/a-modern-backup-solution-for-laravel-apps/

SitePoint PHP Blog:
Learn PHP 7, Find out What’s New, and More
Dec 04, 2015 @ 11:16:24

Now that PHP 7 has been released, it's time to catch up with what this new major version has to offer. In this tutorial from SitePoint you can learn about what the latest features and changes are in this release (including what happened to PHP 6).

PHP 7, the next version of the world’s most popular programming language, has been released. We’d love to shoot fireworks and get drunk with our newfound power (seriously, the language is in the true big leagues now, functionality and performance-wise) but we’re sure the rest of the internet will do this for us. Instead, we’ll focus on compiling a (perpetually up to date) list of resources to get started with version 7 – posts describing what’s new, books helping you kick things off, and more.

The post starts by answering the "what happened to PHP 6?" question, listing a few resources with some more information on the topic. Following this it gets into the "what's new" of PHP 7 including:

  • Links to guides to the features themselves
  • Tools to help you get a PHP 7 environment set up
  • Other PHP 7-related tools

There's also some other miscellaneous things mentioned including the gophp7-ext project trying to get as many extensions PHP 7 compatible and some sources for more "live" help for your questions.

tagged: php7 whatsnew features links resources tools gettingstarted gophp7ext

Link: http://www.sitepoint.com/learn-php-7-find-out-whats-new-and-more/

Developer Drive:
Looming PHP 7 and its effect on WordPress
Nov 26, 2015 @ 11:54:15

On the Developer Drive site they've posted an article for all of the WordPress users (and other curious folks) about the impact PHP 7 will have on the current WordPress system.

It’s no big secret now that PHP 7 is just on the horizon, and with that development comes questions on how it affects sites that run on WordPress. PHP 7 is a massive update to the server-side web development language called PHP, yet it’s also going to have an impact on any PHP-powered CMS like Drupal, Joomla and Magento.

They go through some of the major changes in PHP 7 and talk briefly about what kind of effects they'll have on those running this popular CMS including:

  • Performance upgrades
  • New and improved operators
  • Continuous 64-bit support
  • Anonymous class support

They recommend that you keep an eye out for messages from your host that they might be upgrading, backing up your site to prevent loss and update your plugins/themes prior to any PHP 7 switch over.

tagged: php7 wordpress features update recommendation hosting

Link: http://www.developerdrive.com/2015/11/looming-php-7-and-its-effect-on-wordpress/

SitePoint PHP Blog:
PHP vs Ruby – Let’s All Just Get Along
Nov 23, 2015 @ 09:36:09

On the SitePoint PHP blog Phil Sturgeon has written up a comparison of the PHP language versus Ruby suggests that we all just get along from the perspective of a developer that works with both happily.

Quite often you see developers who have a lot of experience in one language try to play with another, then make a rather quick comparison between the two. This comparison is usually quite worthless, but the clickbait titles get them a lot of traffic.

Instead of doing that, I thought it would be interesting to have a slightly more fair comparison, from the perspective of someone who really enjoys writing both PHP and Ruby, and has done so for years. The aim here is not to find out which is “better”, but to point out a few key things I like about Ruby and its ecosystem.

He starts with some of the basics conceptual differences between the two languages including the differences with methods/variables/properties and type hinting versus duck typing. He also covers some "fun features" of each language including:

  • Nested classes
  • Using debuggers (and the tools offered)
  • "Unless" handling
  • Predicate methods
  • Shorter array syntax (in Ruby)

There's many more mentioned through the end of the post too, so be sure to check out the rest in the remainder of the article. Each point come with some brief code examples show how the feature is implemented depending on which language is being discussed.

tagged: ruby language comparison features differences

Link: http://www.sitepoint.com/php-vs-ruby-lets-all-just-get-along/

PHP.net:
PHP7 Migration Guide Posted
Aug 17, 2015 @ 11:29:48

The official PHP.net has posted their PHP 7 migration guide for those already on PHP 5.6.x and wanting to prepare their applications for PHP7.

Despite the fact that PHP 7.0 is a new major version, efforts were put in to make migration as painless as possible. This release focusses mainly on removing functionality deprecated in previous versions and improving language consistency. There are a few incompatibilities and new features that should be considered, and code should be tested before switching PHP versions in production environments.

The guide includes links to other pages showing things like:

  • Backward incompatible changes
  • New features
  • Deprecated features in PHP 7.0.x
  • New functions/classes/interfaces/global constants
  • Removed Extensions and SAPIs

There's also a link to some other various changes that's not completely fleshed out yet, but is evolving as PHP 7 gets closer to a final release.

tagged: php7 migration guide php56 changes update deprecation remove features

Link: http://php.net/manual/en/migration70.php