A domain name is your web address, the URL of your website and the basis for your e-mail addresses.
Get your website, web store or application online using our reliable and fast hosting.
Create a website or web store you will be proud of by yourself.
Work online without any problems thanks to your mailbox, the Office Suite, etc.
Powerful solutions to keep your website, shop or app online.
Tailored IT advice to improve your business and make it more successful. Whatever your needs, we will always find a suitable solution. From €199 per month.
Take advantage of being a Combell partner.
Lees in het Nederlands - Lisez en français
PHP 7 is finally available... What a magnificent end of year gift for all developers!
The many PHP developers were really looking forward to discovering the new version of this programming language, particularly as it promised to deliver much better performance. But PHP 7 has much more to offer. Combell technology evangelist Thijs Feryn gives some explanation (click here for a technical version with more details and code examples on Thijs’s personal blog).
There is no need to tell you once again that PHP is very popular among developers. Back when it was created by Rasmus Lerdorf, in 1994, PHP stood for Personal Home Page. Today, the language has become an efficient and versatile tool for developing websites, partly thanks to the very active community of developers who constantly improve this language.
But this week, a new milestone was reached in the evolution of this language: PHP version 7.0 has been released. The first thing we notice is its impressive performance, which results from the new PHP Next Generation engine, the successor of the old Zend Engine. This new engine is claimed to be twice as fast as the previous version, PHP 5.6.
However, this new version has much more to offer. You can e.g. use scalar type hints. Originally, PHP was a loosely typed language, which means that variables are not declared with strict data types, so that a variable in a script can be assigned a value of a different type than the one of the original value.
That makes PHP extremely flexible, but sometimes also unreliable, because errors are not reported immediately. This is why, over time, type hints have been added: if a value does not match the type hint, a warning is thrown. And that was a great idea, but until now these type hints were limited to objects, arrays and callables.
This is why PHP 7 presents scalar type hints: integers, strings, booleans and floats can now also be used as type hints. Moreover, return type declarations are now supported. As a developer, this allows you to make sure that the output of functions and methods is consistent.
When you run PHP in standard mode (coercive), PHP will only report errors when it returns a wrong type that cannot be converted to the desired type. The string “12” will e.g. be allowed if the interface of the function or method expects an integer. But if you activate strict mode, PHP will be less forgiving and throw an error when the types do not completely match.
PHP 7 also introduced a couple of new operators: the null coalesce operator and the spaceship operator.
The null coalesce operator is a ternary operator, which checks whether the evaluated value exists and if it is not null. If it is the case, the value is returned. If not, an alternative value is returned.
As for the spaceship operator (we really love that name!), it makes it possible to define whether a value is greater than, less than or equal to another value. This is expressed with 0 (equal to), -1 (less than) or 1 (greater than).
We should also mention classes. In PHP’s object-oriented model, classes are explicitly declared, and later explicitly instantiated to objects. From PHP 7, it is possible to declare anonymous classes. These are classes that are declared on the fly, much like anonymous functions ( ~ callbacks) that have been available in PHP 5 for a while now.
Attentive readers will probably wonder why this new version is named PHP 7.0, given that the previous version was named PHP 5.6. So, what exactly happened to PHP 6? Well, PHP 6 has definitely existed, but it has never been released. The main purpose of PHP 6 was indeed to provide full Unicode support, also at the level of the language itself. But that goal appeared to be impossible to reach and PHP 6 was pronounced dead. The other features that PHP 6 should have introduced were added to PHP 5.3.
Although PHP 6 has never seen the light of day, the project did exist within the PHP core group. This is precisely why the decision was taken to name the new version PHP 7.
PHP offers many other new features that are too numerous to discuss in this article. Feel free to visit http://php.net/manual/en/migration70.new-features.php for a complete overview.
Our colleague, Thijs, has once again lived up to his reputation as a technology evangelist at Combell: he made a video to explain the main features using code examples.
He also wrote a technical blog post about it with additional details and code examples.
That is possible! We already have PHP 7.0.0 available on our shared hosting packages. Go to your My Combell control panel to migrate from PHP 5 to PHP 7. Do you want to use PHP 7 on your Cloud server? That is possible too! Please contact our helpdesk. If necessary, our collaborators can compile PHP 7 on your system.
Click here to order PHP 7 hosting
One last thing: PHP 7 also includes a few backwards incompatible changes. Go to http://php.net/manual/en/migration70.incompatible.php and check whether your code is compatible with these changes.
Good luck with your lightning-fast PHP!
For the shared hosting platform at Combell, we strive to get you the latest and most up2date PHP versions. We make it a goal to be able to deliver every...
The setting: the Wild West. The people: enthusiastic, playful and eager to learn. The tutorials and talks: amusing, fascinating and innovative. Once again, there were lots and lots of ideas that...
The PHPBenelux conference in Edegem was once again a success. There was an exhilarating atmosphere in the hallways, some interesting talks to gain new insights, and many cordial networking moments....
© 1999 - 2021 Combell nv.All prices exclude VAT.
| General conditions