PHP 8.3 release and features

By Dillon Smart · · · 0 Comments

The time of year is fast approaching for PHP developers around the world. We have a new PHP release knocking on the door.

PHP 8.3 RC 1 is now available for testing, and with this release we are able to get a glimps at some of the highlight features coming later in the year.

PHP 8.3 release date

Since 2015, we’ve been able to expect a new PHP release annually, around November / December. PHP 8.3 is no exeption. The team behind the latest release are pushing for a release in November 2023 with supported expected until November 2026.

For the Symfony and Laravel developers out there, you can expect releases of these popular PHP frameworks to follow shortly after the release of PHP 8.3.

Symfony 6.4 is expected to release in November 2023.

Laravel 11 is expected to be released in Q1 2024.

New features in PHP 8.3

The next major release is packed full of bug fixes and new features. Here are some highlight features coming in PHP 8.3.

json_validate in PHP 8.3

PHP 8.3 adds a new function to validate a JSON string by returning true or false.

<?php 

json_validate('[1, 2, 3]'); // returns true
json_validate('[1,2,3'); //returns false

Did you know, searching for json validate in DuckDuckGo opens a JSON Beautifier & Validator above the search results

Typed Class Constants

From PHP 8.3 typed class constants are supported.

<?php 

class MyClass 
{

    const string FOO = 'bar';

}

Other features include:

  • Support for rounding negative numbers in number_format()
  • A fix for precision loss on formatting decimal integers in number_format()
  • Allowing comments between & and a parameter

Little known features in PHP

There are many little known features in PHP. Learn about Numeric Literal Separators which was released way back in PHP 7.4.

PHP

0 Comment

Was this helpful? Leave a comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.

PHP Variable Variables

Updated 1st June 2022

In PHP, it is sometimes necessary to have variables that have variable names. Traditionally, a variable is given a name and a value is given to the variable like so: $foo = 'bar'; A Variable Variable, or Double Dollar Variable, gets its name from the value of another variable like so: $foo = 'bar'; $$foo

Laravel – Specified key was too long Error

Updated 18th May 2021

With Laravel 5.4, some users may be hit with the Laravel Specified key was too long Error when migrating the database. This is because in the latest Laravel update, the developers made changes to the default database charset, making it utf8mb4. If your using MySQL 5.7.7 or higher, you won’t encounter this issue, however older versions of MySQL

WordPress wp-admin redirects to HTTPS

Updated 18th May 2021

Does your WordPress wp-admin redirect to https rather than http? Below is a simple tutorial to stop this from happening. First, check the siteurl in the wp_options table within your database. Make sure the option_value is your site address with http:// not https://. If your siteurl is set as http:// the try the following. Open