Skip to content
Advertisement

PHP 7.2 Function create_function() is deprecated

I have used create_function() in my application below.

JavaScript

But for PHP 7.2.0, create_function() is deprecated.

How do I rewrite my code above for PHP 7.2.0?

Advertisement

Answer

You should be able to use an Anonymous Function (aka Closure) with a call to the parent scoped $delimiter variable, like so:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement