Title: PHP 8 support?
Last modified: January 1, 2021

---

# PHP 8 support?

 *  Resolved [Gwyneth Llewelyn](https://wordpress.org/support/users/gwynethllewelyn/)
 * (@gwynethllewelyn)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/php-8-support-2/)
 * Hi there,
 * I understand that, for some reason that completely eludes me, Automattic has 
   dropped all support of IntenseDebate (it’s not even listed as a service/app/plugin
   on Automattic’s own website).
 * However, even in 2021, it continues to be useful. Dated, sure, but useful.
 * A few years ago (not many!), PHP 7 came out, and with it, legacy code started
   to break down. Someone nice at Automattic silently made whatever was required
   to get IntenseDebate working again. Yay! But now, PHP 8 is knocking at our doors,
   and it seems that some functionality that was flagged as ‘deprecated’ under PHP
   7, now throws a fatal error under PHP 8:
 *     ```
       PHP Fatal error:  Uncaught Error: Call to undefined function create_function() in <WP_PATH>/wp-content/plugins/intensedebate/intensedebate.php:149
       Stack trace:
       #0 <WP_PATH>/wp-content/plugins/intensedebate/intensedebate.php(2721): id_activate_hooks()
       #1 <WP_PATH>/wp-settings.php(388): include_once('...')
       #2 <WP_PATH>/wp-config.php(82): require_once('...')
       #3 <WP_PATH>/wp-load.php(37): require_once('...')
       #4 <WP_PATH>/wp-blog-header.php(13): require_once('...')
       #5 <WP_PATH>/index.php(17): require('...')
       #6 {main}
         thrown in <WP_PATH>/wp-content/plugins/intensedebate/intensedebate.php on line 149" while reading response header from upstream
       ```
   
 * This is a classical example, and one that is very easy to fix — see [https://sarah-moyer.com/fix-create_function-deprecated-in-wordpress/](https://sarah-moyer.com/fix-create_function-deprecated-in-wordpress/)(
   it also links to other possible solutions), or, even better, [https://stackoverflow.com/a/52515758/1035977](https://stackoverflow.com/a/52515758/1035977)
 * On line 149 of `/wp-content/plugins/intensedebate/intensedebate.php`, instead
   of
 *     ```
                             add_filter( 'option_moderation_notify', create_function( '$a', 'return 0;' ) )
                             add_filter( 'option_comments_notify', create_function( '$a', 'return 0;' ) );
       ```
   
 * use the following code:
 *     ```
                               add_filter( 'option_moderation_notify', function($a) { return 0; } );
                               add_filter( 'option_comments_notify', function($a) { return 0; } );
       ```
   
 * Basically, [create_function()](https://www.php.net/manual/en/function.create-function)
   was a hack introduced in PHP 4 (!!!) to allow PHP to have anonymous functions;
   it became deprecated under 7.2 and was removed in 8.0, since [PHP has closures since 5.3.0](https://www.php.net/manual/en/functions.anonymous.php)
   and WordPress is supposed to run only under 5.6+ anyway. `create_function()` 
   has serious performance issues and, worse than that, it has some security vulnerabilities,
   since it relies on `eval()` and is theoretically subject to the same issues as`
   eval()`. [Eval() is Evil](https://link.springer.com/chapter/10.1007/978-981-10-3935-5_12)(
   and that’s from some peer-reviewed academic scientists researching the subject,
   not random developers with their ‘opinions’!).
 * So please get rid of it! 😉
 * Thanks in advance!

The topic ‘PHP 8 support?’ is closed to new replies.

 * ![](https://ps.w.org/intensedebate/assets/icon.svg?rev=2833542)
 * [IntenseDebate Comments](https://wordpress.org/plugins/intensedebate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/intensedebate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/intensedebate/)
 * [Active Topics](https://wordpress.org/support/plugin/intensedebate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/intensedebate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/intensedebate/reviews/)

## Tags

 * [create_function](https://wordpress.org/support/topic-tag/create_function/)

 * 0 replies
 * 1 participant
 * Last reply from: [Gwyneth Llewelyn](https://wordpress.org/support/users/gwynethllewelyn/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/php-8-support-2/)
 * Status: resolved