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

Exakat Blog:
Get ready for PHP 7.2
Nov 20, 2017 @ 09:56:21

With the final release of PHP 7.2 coming on the horizon the Exakat blog wants to be sure you and your code are prepared for some of the changes. In this new post they share things to change and improvements to expect in this latest version of the PHP language.

PHP 7.2 is around the corner, and shall be out soon, thanks to the hard work of @RemiCollet), Sara Golemon (@saramg) and countless others that run tests and submit bug reports. PHP 7.2 is already RC6, and the documentation has even been updated : it is high time to get ready for PHP 7.2.

We have been hard at work, at @Exakat, to prepare the migration analysis. This is our take on this upcoming task.

He's broken the changes coming down into a few categories based on the actions required and what you can do to prepare: Know, Lint, Static (Analysis), Unit testing and Logging. A chart is then included showing each of the changes, which category they fall into and links to more information about them and what has been updated (or added).

tagged: php72 preparation lint staticanalysis unittest logging update version language

Link: https://www.exakat.io/get-ready-php-7-2/

Jordi Boggiano:
PHP Versions Stats - 2017.2 Edition
Nov 13, 2017 @ 11:51:01

Jordi Boggiano is back with the latest round of his PHP version statistics as gathered from the information provided by the Composer package management tool for PHP.

It's stats o'clock! See 2014, 2015, 2016.1, 2016.2 and 2017.1 for previous similar posts.

A quick note on methodology, because all these stats are imperfect as they just sample some subset of the PHP user base. I look in the packagist.org logs of the last month for Composer installs done by someone. Composer sends the PHP version it is running with in its User-Agent header, so I can use that to see which PHP versions people are using Composer with.

He then shares the results of the statistics including the total number of users for each version of the language and the difference in just the last 6-7 months. PHP 7.1 has pulled out as a front-runner with PHP 7.0 coming in closely after. He also shows some historical data showing the decline of the 5.x versions and the rise of 7.x versions over the past years. The post ends with information about the percentage of requirements in packages with 5.6 taking the lead but not by much.

tagged: composer language version usage statistics 2017

Link: https://seld.be/notes/php-versions-stats-2017-2-edition

PHP.net:
PHP 7.2.0RC6 Released
Nov 10, 2017 @ 12:19:16

On the main PHP.net site they've posted the announcement about the release of the latest (and last) Release Candidate of the next major version of the PHP language: PHP 7.2.0 RC6.

The PHP development team announces the immediate availability of PHP 7.2.0 RC6. This release is the sixth Release Candidate for 7.2.0. Barring any surprises, we expect this to be the FINAL release candidate, with Nov 30th's GA release being not-substantially different. All users of PHP are encouraged to test this version carefully, and report any bugs and incompatibilities in the bug tracking system.

This development preview release includes changes to GD image handling, SOAP functionality and core bugfixes. You can download this latest release for testing with your own applications either via the source QA site or the Windows QA site for the Windows executable.

tagged: language release php72 php72rc6 preview

Link: http://php.net/index.php#id2017-11-09-1

Niklas Keller:
The Magic Behind Async PHP
Nov 07, 2017 @ 10:27:51

Niklas Keller has a post to his site covering the magic behind async PHP and how it can help your application gain some performance by working around the typical PHP execution flow.

Async PHP allows a massive speedup of applications by leveraging non-blocking I/O. It allows making multiple HTTP requests in parallel or any other way of I/O multiplexing. But what’s the magic behind it? How does it actually work?

He starts with a brief explanation of the difference between blocking and non-blocking I/O, pointing out that the main difference is the use of streams. He includes a bit of code to help illustrate but moves quickly on to talking about the Amp PHP package. This library allows for easier (and faster) development of non-blocking processes using an event loop. He also shares a package that was created to help make it even simpler by providing an abstraction layer on top of the Input and Output streams.

tagged: async language amp library blocking nonblocking introduction

Link: https://blog.kelunik.com/2017/11/06/magic-behind-async-php.html

SitePoint PHP Blog:
Your First PHP Code
Nov 02, 2017 @ 12:34:02

On the SitePoint PHP blog there's a new post from author Tom Butler that starts from the very beginning and shows you how to write your first PHP code. The article is an excerpt from the SitePoint book PHP & MySQL: Novice to Ninja, 6th Edition.

PHP is a server-side language. This concept may be a little difficult to grasp, especially if you’ve only ever designed websites using client-side languages like HTML, CSS, and JavaScript.

A server-side language is similar to JavaScript in that it allows you to embed little programs (scripts) into the HTML code of a web page. When executed, these programs give you greater control over what appears in the browser window than HTML alone can provide. The key difference between JavaScript and PHP is the stage of loading the web page at which these embedded programs are executed.

At this point they assume you've already set up the server to allow for PHP execution. They then provide an example of a HTML page with a bit of PHP that generates a random number. It then gets into some of the basic language syntax and statements and how they're used in the PHP code.

tagged: first code tutorial introduction language book excerpt

Link: https://www.sitepoint.com/first-php-code/

PHP.net:
Releases for PHP 5.6.32, 7.0.25, 7.1.11 and 7.2.0 RC 5
Oct 27, 2017 @ 10:53:12

The PHP.net has announced the release of several new versions of the language including a few bugfix versions for stable releases and the latest Release Candidate for the upcoming PHP 7.2.0. The versions that have been released are:

Most of these releases take care of similar bugs found across the different releases with some differences between them. While the others are production releases and it is recommended that you upgrade to those where possible, the Release Candidate is pre-production and should not be considered stable yet.

You can download the stable releases from the downloads page for source or windows.php.net for the Windows binaries. The Release Candidate can be downloaded from the source package QA site or the Windows QA site for the binaries.

tagged: language release bugfix releasecandidate php56 php71 php70 php72rc5

Link: http://php.net

TopTal.com:
Introduction to Objects and References in PHP Memory
Oct 19, 2017 @ 14:50:07

In this new tutorial on the TopTal.com site author Agustin Villalba takes an in-depth look at how objects and references are handled in memory by the PHP language.

In this article, I will talk about how object and variable references are controlled in memory, since this is an issue that can generate discussion and differing opinions. One question to ponder is: “By default, are objects passed by reference or by copy in PHP?” I’m going to talk first about what references are not in PHP; secondly, I’ll discuss what they are, and finally, I will examine how the garbage collector works in PHP.

He starts with a quick comparison between objects and references (since they're slightly different). He then covers what things are and aren't references in PHP and some examples showing what they are in either case. Code examples and visuals are included showing how things relate. The post wraps up with a look at how garbage collection works with objects/references and a few closing thoughts about how the collector chooses which to clean up.

tagged: object reference memory tutorial introduction language garbagecollector

Link: https://www.toptal.com/php/objects-references-php-memory

PHP.net:
PHP 7.2.0 Release Candidate 4 Released
Oct 12, 2017 @ 10:35:30

The main PHP.net site has posted the latest release announcement for a pre-release of the next major version of the language: PHP 7.2.0 Release Candidate 4.

The PHP development team announces the immediate availability of PHP 7.2.0 RC4. This release is the fourth Release Candidate for 7.2.0. All users of PHP are encouraged to test this version carefully, and report any bugs and incompatibilities in the bug tracking system.

This pre-release version fixes some bugs found in previous Release Candidates and can be downloaded from the QA sites: source packages and Windows binaries. Based on the release schedule, the next release candidate will be posted on the 26th of October and will be the last (RC5) before the official branching of PHP 7.2.0 happens.

tagged: php language release php72 releasecandidate php72rc4 preview

Link: http://php.net/index.php#id2017-10-12-1

Adam Culp:
Stop the pain, get to PHP 7
Oct 09, 2017 @ 11:21:24

In a post to his site Adam Culp makes a recommendation to all of those running their applications on older versions of the language: stop the pain, get to PHP7.

So, now you may be asking, “What does [my football story] have to do with upgrading to PHP version 7?” The answer, because many are letting the pain of moving to PHP 7 prevent them from experiencing the pleasure and rewards.

PHP version 7.0 was released almost 2 years ago. (1 year 10 months to be exact.) And many are still running PHP version 5.something. As a matter of fact, PHP version 7.0 is already going to run out of active community support in only 1 month and will only receive security fixes for another year after that.

He then talks about some of the pains that usually come with upgrading, especially when the jump is a relatively large one (like from the 5.x world). He mentions the acclamation of limitations that is all too easy to get used to with older versions. He also covers some of the pleasures that come with PHP 7 including one of the most major ones: the instance performance boost it gives most applications.

tagged: php7 upgrade pain migrate php5 version language

Link: http://www.geekyboy.com/archives/1376

PHP.net:
PHP 7.1.10 Release Announcement
Sep 29, 2017 @ 10:47:02

On the PHP.net site there's an announcement about the release of the latest version in the PHP 7.1.x series: PHP 7.1.10.

The PHP development team announces the immediate availability of PHP 7.1.10. This is a bugfix release, with several bug fixes included. All PHP 7.1 users are encouraged to upgrade to this version.

Changes in this release includes updates to the CLI server, cURL handling, gettext functionality and internationalization. As always you can get the latest release from the main downloads page or from windows.php.net for the Windows binaries.

tagged: download changelog bugfix release php71 language

Link: http://php.net/index.php#id2017-09-29-1