PHP 5.6 End of Beta

Share this article

On June 5th 2014, the PHP group announced the fourth and final beta of the 5.6 version. This milestone ends the beta program and begins the RC program (currently planned for June 19th), which will from now on focus exclusively on making sure the version is stable enough for release. As is customary with a beta program, no new features were added since beta 1 – all the releases were bugfix and improvement patches only.

Changes

Some five months ago we published a list of upcoming new 5.6 features, and since then the PHP group has created a more approachable summary of the changes than one that can be seen in the cryptic changelogs. The list, also called the 5.6 migration guide, is an already very useful work in progress and contains a simple demo of every new feature that matters – you can check it out here.

If you’re interested in seeing all the bugfixes through the betas, you can read the changelog on Github.

Things we haven’t covered in our original post but which have been added in the meanwhile are:

Exponentiation

In a nutshell, “exponentiation via **” it’s an operator which lets you easily calculate a number to the power of another number. However, the order of execution might be counter-intuitive to some. The example states:

$a = 2**3; // $a = 8, i.e. 2^3
$b = 2**3**2; // $b is 512

Most people new to the exponent operator will assume the second line groups operations as such:

(2**3)**2

which would come down to 8**2 which is 64, and not 512. However, the exponential operator here uses the following preference:

2**(3**2)

which comes down to 2**9, and that is 512. Thus, the exponent operator executes from right to left, as is the case in other languages (e.g. Python).

Default UTF-8

The default character encoding has been set to UTF-8 and uses the default_charset ini setting / function.

In an era of super-wide audience reach, having UTF-8 support is of utmost importance. Defaulting to UTF-8 skips several steps developers have had to do with mbstring and iconv previously (now deprecated) in order to support not only reading and writing accurate UTF-8 database data (you still need to configure your database for UTF-8, since it doesn’t have anything to do with PHP) but also to be able to both code on a system with a default local charset, and to display the webpage properly in the browser. With this, there’s no longer any need to set default_charset in the ini settings – it’s set for you as soon as you install PHP.

php://input is reusable

One detail we haven’t mentioned in the last post is the fact that php://input is now reusable – contrary to what the documentation page says. This means you can read it several times now, and it always reads from the same data, which has resulted in a significant memory usage reduction.

GMP operator overloading

GMP, a library we briefly covered before, now supports operator overloading. Previously, you had to use gmp_* functions to, for example, add two GMP objects/resources together (i.e. gmp_add) – now, you can use simpler expressions like +, just like you would with regular numbers.

We are looking for in depth GMP tutorials and real world use cases, so if you’d like to contribute, let us know.

Security upgrades

The function hash_equals() was added, the gost-crypto hash algorithm was introduced, and various SSL/TLS enhancements were implemented.

We won’t be going into detail with these – they’re both outside the scope of this quick overview and complex enough to warrant their own post (care to write it? Let me know), but you can read the details on their respective links.

pgsql async

Pgsql, the extension for PHP’s communication with the PostgreSQL database, now has support for asynchronous operations, joining MySQL in this regard. Asynchronicity might not be exactly what one would assume, so some experimentation is warranted before putting your faith into these operations, but it’s nice to know it’s there nonetheless.

You can see full examples of using PostgreSQL asynchrounously in the tests.

Other changes

These new features aren’t the only thing you should keep in mind – the new docs have several very handy sections helping you transition properly.

BC breaks

The Backwards Incompatible Changes list will tell you about all the areas in which your old apps will fail if used in the same manner they were used up until version 5.6. Some of them are:

  • GMP resources are now objects, which will break previous usages of is_resource
  • mcrypt requires valid keys and IVs
  • json_decode is more strict about upper/lower case on “true”, “false” and “null”
  • and more

Deprecated Features

The deprecated features page lists all the features that will now trigger the E_DEPRECATED error in your code. In this version, they’re calls from incompatible context, $HTTP_RAW_POST_DATA and always_populate_raw_post_data, but one should be mindful of previously deprecated features too – most notably the mysql_* functions of the mysql extension, which is now officially deprecated in its entirety and shouldn’t be used.

Changed Functions

The changed functions list will describe in which way certain functions have changed when compared to their iteration in the previous version. Most notably, they’re the crypt function which now raises a notice if you omit the salt param, the source of mcrypt_create_iv() which now defaults to MCRYPT_DEV_URANDOM, some PostgreSQL functions no longer being experimental, and more.

New Functions

Similar to the new features page, the new functions page lists all the new core and extension functions you can use. For example, the ability to set a password for a Zip archive we’ve mentioned in the last new features post is mentioned on this page.

OpenSSL changes

The OpenSSL changes were so numerous in this release, they warranted their own separate page: http://docs.php.net/manual/en/migration56.openssl.php

This page contains everything from certificate and fingerprint change instructions and explanations to SPKI and more. If you’re a security buff, you’re encouraged to give this a thorough read, and after you do, you’re encouraged to write an in-depth explanation for us :) Let us know if you can make this knowledge reach more eyes in a style appropriate for a wider audience.

Other Changes and Global Constants

The last two pages present other changes in extensions that didn’t fit any other category, and an exhaustive list of new global constants available – albeit without any detailed explanation.

Conclusion

If you’re moving from any other previous version of PHP to a newer one, please pay attention to the migration guides available for all such jumps: http://docs.php.net/manual/en/appendices.php

These guides will cover all major and minor version differences you should know about, and will help you prepare your environment for a potential switch to the latest and greatest.

The end of beta for 5.6. marks a new, important milestone in the PHP community. Several important new features await us as we transition to this new version, and the core developers encourage everyone to test this version and report feedback on any problems they might encounter. The following couple of months will be dealing with Release Candidate versions exclusively, and with the very next version (scheduled for June 19th), it’s safe to say you can start testing 5.6. in production. In the meanwhile, download the beta and start testing!

Bruno SkvorcBruno Skvorc
View Author

Bruno is a blockchain developer and technical educator at the Web3 Foundation, the foundation that's building the next generation of the free people's internet. He runs two newsletters you should subscribe to if you're interested in Web3.0: Dot Leap covers ecosystem and tech development of Web3, and NFT Review covers the evolution of the non-fungible token (digital collectibles) ecosystem inside this emerging new web. His current passion project is RMRK.app, the most advanced NFT system in the world, which allows NFTs to own other NFTs, NFTs to react to emotion, NFTs to be governed democratically, and NFTs to be multiple things at once.

betanew versionOOPHPPHPphp5.6php56
Share this article
Read Next
Digital Transformation with AI: The Benefits and Challenges
Digital Transformation with AI: The Benefits and Challenges
Priyanka Prajapat
Quick Tip: Creating a Date Picker in React
Quick Tip: Creating a Date Picker in React
Dianne Pena
How to Create Interactive Animations Using React Spring
How to Create Interactive Animations Using React Spring
Yemi Ojedapo
10 Reasons to Love Google Docs
10 Reasons to Love Google Docs
Joshua KrausZain Zaidi
How to Use Magento 2 for International Ecommerce Success
How to Use Magento 2 for International Ecommerce Success
Mitul Patel
5 Exciting New JavaScript Features in 2024
5 Exciting New JavaScript Features in 2024
Olivia GibsonDarren Jones
Tools and Strategies for Efficient Web Project Management
Tools and Strategies for Efficient Web Project Management
Juliet Ofoegbu
Choosing the Best WordPress CRM Plugin for Your Business
Choosing the Best WordPress CRM Plugin for Your Business
Neve Wilkinson
ChatGPT Plugins for Marketing Success
ChatGPT Plugins for Marketing Success
Neil Jordan
Managing Static Files in Django: A Comprehensive Guide
Managing Static Files in Django: A Comprehensive Guide
Kabaki Antony
The Ultimate Guide to Choosing the Best React Website Builder
The Ultimate Guide to Choosing the Best React Website Builder
Dianne Pena
Exploring the Creative Power of CSS Filters and Blending
Exploring the Creative Power of CSS Filters and Blending
Joan Ayebola
How to Use WebSockets in Node.js to Create Real-time Apps
How to Use WebSockets in Node.js to Create Real-time Apps
Craig Buckler
Best Node.js Framework Choices for Modern App Development
Best Node.js Framework Choices for Modern App Development
Dianne Pena
SaaS Boilerplates: What They Are, And 10 of the Best
SaaS Boilerplates: What They Are, And 10 of the Best
Zain Zaidi
Understanding Cookies and Sessions in React
Understanding Cookies and Sessions in React
Blessing Ene Anyebe
Enhanced Internationalization (i18n) in Next.js 14
Enhanced Internationalization (i18n) in Next.js 14
Emmanuel Onyeyaforo
Essential React Native Performance Tips and Tricks
Essential React Native Performance Tips and Tricks
Shaik Mukthahar
How to Use Server-sent Events in Node.js
How to Use Server-sent Events in Node.js
Craig Buckler
Five Simple Ways to Boost a WooCommerce Site’s Performance
Five Simple Ways to Boost a WooCommerce Site’s Performance
Palash Ghosh
Elevate Your Online Store with Top WooCommerce Plugins
Elevate Your Online Store with Top WooCommerce Plugins
Dianne Pena
Unleash Your Website’s Potential: Top 5 SEO Tools of 2024
Unleash Your Website’s Potential: Top 5 SEO Tools of 2024
Dianne Pena
How to Build a Chat Interface using Gradio & Vultr Cloud GPU
How to Build a Chat Interface using Gradio & Vultr Cloud GPU
Vultr
Enhance Your React Apps with ShadCn Utilities and Components
Enhance Your React Apps with ShadCn Utilities and Components
David Jaja
10 Best Create React App Alternatives for Different Use Cases
10 Best Create React App Alternatives for Different Use Cases
Zain Zaidi
Control Lazy Load, Infinite Scroll and Animations in React
Control Lazy Load, Infinite Scroll and Animations in React
Blessing Ene Anyebe
Building a Research Assistant Tool with AI and JavaScript
Building a Research Assistant Tool with AI and JavaScript
Mahmud Adeleye
Understanding React useEffect
Understanding React useEffect
Dianne Pena
Web Design Trends to Watch in 2024
Web Design Trends to Watch in 2024
Juliet Ofoegbu
Building a 3D Card Flip Animation with CSS Houdini
Building a 3D Card Flip Animation with CSS Houdini
Fred Zugs
How to Use ChatGPT in an Unavailable Country
How to Use ChatGPT in an Unavailable Country
Dianne Pena
An Introduction to Node.js Multithreading
An Introduction to Node.js Multithreading
Craig Buckler
How to Boost WordPress Security and Protect Your SEO Ranking
How to Boost WordPress Security and Protect Your SEO Ranking
Jaya Iyer
Understanding How ChatGPT Maintains Context
Understanding How ChatGPT Maintains Context
Dianne Pena
Building Interactive Data Visualizations with D3.js and React
Building Interactive Data Visualizations with D3.js and React
Oluwabusayo Jacobs
JavaScript vs Python: Which One Should You Learn First?
JavaScript vs Python: Which One Should You Learn First?
Olivia GibsonDarren Jones
13 Best Books, Courses and Communities for Learning React
13 Best Books, Courses and Communities for Learning React
Zain Zaidi
5 jQuery.each() Function Examples
5 jQuery.each() Function Examples
Florian RapplJames Hibbard
Implementing User Authentication in React Apps with Appwrite
Implementing User Authentication in React Apps with Appwrite
Yemi Ojedapo
AI-Powered Search Engine With Milvus Vector Database on Vultr
AI-Powered Search Engine With Milvus Vector Database on Vultr
Vultr
Understanding Signals in Django
Understanding Signals in Django
Kabaki Antony
Why React Icons May Be the Only Icon Library You Need
Why React Icons May Be the Only Icon Library You Need
Zain Zaidi
View Transitions in Astro
View Transitions in Astro
Tamas Piros
Getting Started with Content Collections in Astro
Getting Started with Content Collections in Astro
Tamas Piros
What Does the Java Virtual Machine Do All Day?
What Does the Java Virtual Machine Do All Day?
Peter Kessler
Become a Freelance Web Developer on Fiverr: Ultimate Guide
Become a Freelance Web Developer on Fiverr: Ultimate Guide
Mayank Singh
Layouts in Astro
Layouts in Astro
Tamas Piros
.NET 8: Blazor Render Modes Explained
.NET 8: Blazor Render Modes Explained
Peter De Tender
Mastering Node CSV
Mastering Node CSV
Dianne Pena
A Beginner’s Guide to SvelteKit
A Beginner’s Guide to SvelteKit
Erik KückelheimSimon Holthausen
Brighten Up Your Astro Site with KwesForms and Rive
Brighten Up Your Astro Site with KwesForms and Rive
Paul Scanlon
Which Programming Language Should I Learn First in 2024?
Which Programming Language Should I Learn First in 2024?
Joel Falconer
Managing PHP Versions with Laravel Herd
Managing PHP Versions with Laravel Herd
Dianne Pena
Accelerating the Cloud: The Final Steps
Accelerating the Cloud: The Final Steps
Dave Neary
An Alphebetized List of MIME Types
An Alphebetized List of MIME Types
Dianne Pena
The Best PHP Frameworks for 2024
The Best PHP Frameworks for 2024
Claudio Ribeiro
11 Best WordPress Themes for Developers & Designers in 2024
11 Best WordPress Themes for Developers & Designers in 2024
SitePoint Sponsors
Top 9 Best WordPress AI Plugins of 2024
Top 9 Best WordPress AI Plugins of 2024
Dianne Pena
20+ Tools for Node.js Development in 2024
20+ Tools for Node.js Development in 2024
Dianne Pena
The Best Figma Plugins to Enhance Your Design Workflow in 2024
The Best Figma Plugins to Enhance Your Design Workflow in 2024
Dianne Pena
Harnessing the Power of Zenserp for Advanced Search Engine Parsing
Harnessing the Power of Zenserp for Advanced Search Engine Parsing
Christopher Collins
Build Your Own AI Tools in Python Using the OpenAI API
Build Your Own AI Tools in Python Using the OpenAI API
Zain Zaidi
The Best React Chart Libraries for Data Visualization in 2024
The Best React Chart Libraries for Data Visualization in 2024
Dianne Pena
7 Free AI Logo Generators to Get Started
7 Free AI Logo Generators to Get Started
Zain Zaidi
Turn Your Vue App into an Offline-ready Progressive Web App
Turn Your Vue App into an Offline-ready Progressive Web App
Imran Alam
Clean Architecture: Theming with Tailwind and CSS Variables
Clean Architecture: Theming with Tailwind and CSS Variables
Emmanuel Onyeyaforo
How to Analyze Large Text Datasets with LangChain and Python
How to Analyze Large Text Datasets with LangChain and Python
Matt Nikonorov
6 Techniques for Conditional Rendering in React, with Examples
6 Techniques for Conditional Rendering in React, with Examples
Yemi Ojedapo
Introducing STRICH: Barcode Scanning for Web Apps
Introducing STRICH: Barcode Scanning for Web Apps
Alex Suzuki
Using Nodemon and Watch in Node.js for Live Restarts
Using Nodemon and Watch in Node.js for Live Restarts
Craig Buckler
Task Automation and Debugging with AI-Powered Tools
Task Automation and Debugging with AI-Powered Tools
Timi Omoyeni
Quick Tip: Understanding React Tooltip
Quick Tip: Understanding React Tooltip
Dianne Pena
12 Outstanding AI Tools that Enhance Efficiency & Productivity
12 Outstanding AI Tools that Enhance Efficiency & Productivity
Ilija Sekulov
React Performance Optimization
React Performance Optimization
Blessing Ene Anyebe
Introducing Chatbots and Large Language Models (LLMs)
Introducing Chatbots and Large Language Models (LLMs)
Timi Omoyeni
Migrate to Ampere on OCI with Heterogeneous Kubernetes Clusters
Migrate to Ampere on OCI with Heterogeneous Kubernetes Clusters
Ampere Computing
Scale Your React App with Storybook and Chromatic
Scale Your React App with Storybook and Chromatic
Daine Mawer
10 Tips for Implementing Webflow On-page SEO
10 Tips for Implementing Webflow On-page SEO
Milan Vracar
Create Dynamic Web Experiences with Interactive SVG Animations
Create Dynamic Web Experiences with Interactive SVG Animations
Patricia Egyed
5 React Architecture Best Practices for 2024
5 React Architecture Best Practices for 2024
Sebastian Deutsch
How to Create Animated GIFs from GSAP Animations
How to Create Animated GIFs from GSAP Animations
Paul Scanlon
Aligning Teams for Effective User Onboarding Success
Aligning Teams for Effective User Onboarding Success
Himanshu Sharma
How to use the File System in Node.js
How to use the File System in Node.js
Craig Buckler
Laravel vs CodeIgniter: A Comprehensive Comparison
Laravel vs CodeIgniter: A Comprehensive Comparison
Dianne Pena
Essential Tips and Tricks for Coding HTML Emails
Essential Tips and Tricks for Coding HTML Emails
Rémi Parmentier
How to Create a Sortable and Filterable Table in React
How to Create a Sortable and Filterable Table in React
Ferenc Almasi
WooCommerce vs Wix: Which Is Best for Your Next Online Store
WooCommerce vs Wix: Which Is Best for Your Next Online Store
Priyanka Prajapati
GCC Guide for Ampere Processors
GCC Guide for Ampere Processors
John O’Neill
Navigating Data Management: Warehouses, Lakes and Lakehouses
Navigating Data Management: Warehouses, Lakes and Lakehouses
Leonid Chashnikov
Integrating MongoDB with Node.js
Integrating MongoDB with Node.js
Dianne Pena
How to Use Node.js with Docker
How to Use Node.js with Docker
Craig Buckler
4 Reasons Why You Should Join A Freelancing Community
4 Reasons Why You Should Join A Freelancing Community
Kyle Prinsloo
ChatGPT vs AutoGPT: Comparing Top Language Models
ChatGPT vs AutoGPT: Comparing Top Language Models
Dianne Pena
How to Perform User Authentication with Flask-Login
How to Perform User Authentication with Flask-Login
Yemi Ojedapo
BERT vs LLM: A Comparison
BERT vs LLM: A Comparison
Dianne Pena
Monitoring Your Python App with AppSignal
Monitoring Your Python App with AppSignal
Connor James
BabyAGI vs AutoGPT: A Comprehensive Comparison
BabyAGI vs AutoGPT: A Comprehensive Comparison
Dianne Pena
Top Redux Alternatives: Exploring State Management Solutions
Top Redux Alternatives: Exploring State Management Solutions
Dianne Pena
Code Migration: Ampere Porting Advisor for x86 to AAarch64
Code Migration: Ampere Porting Advisor for x86 to AAarch64
Pete Baker
React Router v6: A Beginner’s Guide
React Router v6: A Beginner’s Guide
James Hibbard
Get the freshest news and resources for developers, designers and digital creators in your inbox each week