The future of PHP: a look at what PHP 9 will bring

← The future of PHP: a look at what PHP 9 will bring

Ashterix

docs: English JsonRpcBundle docs, REST and MCP Bundle sections, package cards

en/articles/from-tg/php/php-9.md new file +89 −0

The future of PHP: a look at what PHP 9 will bring

PHP is more alive than ever 😎

And although some people still consider it a "dinosaur", the language keeps evolving. PHP 9.0 may become the very moment when "magic" gives way to cleanliness, and unexpected tricks give way to predictability.

There is no official date for PHP 9 yet, but the RFC discussions are already heating up.

After 8.5 (and maybe 8.6) we will get a stricter, more logical and, importantly, stable PHP.

So if you don't follow the RFCs yet, I'll share this information with you.

1. The ++ / -- operators will become more honest

No more weird conversions of strings into numbers.

$a = 'a9';
$a++;
// PHP < 9.0 -> 'b0'
// PHP 9.0 -> TypeError

Less "magic".

2. unserialize() will throw exceptions

try {
    $obj = unserialize($data);
} catch (UnserializationFailedException $e) {
    // handle
}

An exception instead of a warning.

3. Fewer type overrides

$arr = false;
$arr[] = 2; 
// PHP < 9.0 -> [2]
// PHP 9.0 -> Error

Now it will be an error rather than shooting yourself in the foot.

4. String interpolation — without extra magic

$name = "Alex";
echo "Hello $name"; // ✅
echo "Hello {$name}"; // ✅
echo "Hello ${name}"; // ❌ Deprecation

Bringing everything to a single standard.

5. Warning == fatal error

Undefined variables, properties or access to null will no longer get through "somehow".

echo $undefinedVar;   
// PHP < 9.0 -> Warning
// PHP 9.0 -> Fatal error

PHP will be more demanding about code quality — and that's a good thing.

6. Cleaning out old "stuff"

Old-style constructors, deprecated functions, non-standard logic — all of this will go to the archive.

Less junk, less ambiguity.

Summary

PHP 9.0 should radically change the approach to writing code and its culture. Less permissiveness, more control.

If your code is already clean, strictly typed and free of magic, you have nothing to fear 💪


First published in Ukrainian in the Telegram channel “Created to die” on October 14, 2025.