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

24 Days in December:
Giving back to PHP
Dec 12, 2017 @ 10:29:43

On the "24 Days in December" advent calendar there's an article posted from Kalle Sommer Nielsen that talks about some ways that you can give back to PHP including documentation updates, contributing to the core code and just helping out the community in general.

PHP has a tremendous community behind it, that community consists of you and me, and millions of others that help promote PHP by continuing to develop awesome applications that power some of the biggest websites in the world, but within this community exists a relatively small community that actively develops PHP, such as making it run on your favorite platform or making your favorite extensions compile and work or even keeps the documentation up-to-date. Today I want to dwell into that community, and perhaps giving you flavor enough to contribute back to PHP with code.

The article suggests several places you can give back including:

  • updating and adding changes to the PHP manual documentation
  • participating in the various project mailing lists
  • reviewing pull requests on the project's GitHub repository
  • writing tests for the untested parts of the language

Kalle wraps up the article talking about his own experience with the language over the years and how it ended up that he was the one to remove register_globals from the language one day.

tagged: give back contribute language opinion 24daysindecember

Link: https://24daysindecember.net/2017/12/11/giving-back-to-php/

Pehapkari.cz:
Domain-Driven Design - Language
Dec 08, 2017 @ 09:46:34

On the Pehapkari.cz blog today they've posted an article about something that, while not directly related to the code of your application, can help to improve the end result: defining a common language for domain-driven design.

Domain-driven design is a software design that focuses on understanding underlying business. It is useful for long-term projects because it leads to high-quality software that serves users. It helps when dealing with difficult problems, keeps track of core problems and prevents us from getting lost in the code.

The author starts the article by talking about issues before adopting a domain-driven design process and briefly describes what DDD is and what its goals are. The post then gets into some the basics behind defining your own domain and gives an example of definition of "account" and "price" for an e-commerce application. It then goes on to talk about goal of creating a ubiquitous language for the product that also includes functionality and process, not just the objects in the system.

tagged: domaindrivendesign domain language ubiquitous introduction

Link: https://pehapkari.cz/blog/2017/12/05/domain-driven-design-language/

PHP.net:
PHP 7.2.0 Released
Nov 30, 2017 @ 11:20:32

The PHP development group has a post on the main PHP.net site officially announcing the availability of the latest major version in the PHP 7.x series: PHP 7.2.0.

The PHP development team announces the immediate availability of PHP 7.2.0. This release marks the second feature update to the PHP 7 series.

There's a number of new features and changes that come with this release including counting of non-countable objects, the Object typehint, the removal of mcrypt and the new libsodium extension. You can view the full list of changes and bug fixes in the Changelog.

Downloads are available in the usual places: the main downloads page for the source packages and windows.php.net for the Windows binaries. Additionally a migration guide has been posted to help with migrating to this new version.

tagged: php72 release language version update migration

Link: http://php.net/archive/2017.php#id2017-11-30-1

PHP.net:
PHP 7.1.12 Released
Nov 28, 2017 @ 11:16:22

On the main PHP.net site they've posted an announcement about the latest release in the PHP 7.1.x series: PHP 7.1.12:

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

Bugs in this released include issues in PHP's CLI handling, GD image manipulation, internationalization and reflection with Mysqli. You can find the full listing of issues fixed in the full Changelog. As always you can download this latest release from the main downloads page for the source packages and windows.php.net for the Windows binaries.

tagged: language release php71 bugfix upgrade

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

KillerPHP.com:
PHP vs Python in 2018?
Nov 27, 2017 @ 13:43:35

On the KillerPHP.com site there's a new post that compares two popular languages - PHP and Python and tries to answer the question "Which one should I learn?"

One question I get often, is which programming language should you learn? I’ve been getting this question for years!

Things change in the programming world, languages come and go. But the good news is that the basics, the core concepts and techniques, are 90-95% the same in all the modern programming languages. [...] What that means, is that your programming language choice, isn’t nearly as critical as you’d think. Why? Well, once you know one programming language, it is easy as apple pie to switch to another!

He then gives some of his own thoughts about how you could decide which language you should pick including the kinds of programming (target result) and what kinds of jobs you can get with each.

tagged: python language comparison select jobs programming

Link: https://www.killerphp.com/articles/php-vs-python-in-2018/

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/