The only constant is change.
– Heraclitus of Ephesus
PHP is a living language and as such, as some things are added, others are removed. Since PHP adheres to the best practice of Semantic Versioning, nothing will be going away in PHP 7.2, but some things will be marked as “Deprecated” so that developers can start removing them from their code and finding better ways to get the job done.
PHP 7.2 brings us a new list of things that will be eventually going away. The complete list, as well as explinations and voting can be found at “PHP RFC: Deprecations for PHP 7.2” Here’s the rundown.
-
__autoload
-
$php_errormsg
-
create_function()
-
mbstring.func_overload
-
(unset)
cast -
parse_str()
without second argument -
gmp_random()
-
each()
-
assert()
with string argument -
$errcontext
argument of error handler
Of all the ones being voted on, only each()
seems like it may not pass. The rest are all unanimous or with one or two no votes.
So it’s time to fire up your favorite IDE (or grep) and start looking for these. Again, they will not go away when PHP 7.2 is released. However, you are being put on notice that they will go away when 8 is released so you might as well identify them and start working on a fix.
[…] I haven’t done a lot of research yet so please shout at me if I’m wrong), with a few deprecations. These alpha releases are really important to catch bugs so I would encourage anyone who has the […]