Title: PHP 8 compatibility
Last modified: September 1, 2022

---

# PHP 8 compatibility

 *  [Raam Dev](https://wordpress.org/support/users/raamdev/)
 * (@raamdev)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/php-8-compatibility-66/)
 * The current version of Taboola (v1.0.10) is incompatible with PHP 8. The plugin
   will appear to activate, but Taboola will not appear within the WP Admin menu.
 * I tracked the problem down to at least two issues that make the plugin incompatible
   with PHP 8:
 * – The plugin uses `create_function()`, which was removed from PHP 8: [https://www.php.net/manual/en/function.create-function.php](https://www.php.net/manual/en/function.create-function.php)
   –
   The plugin uses PHP4 style constructors, which are not allowed in PHP 8
 * I was able to patch the plugin and get it to show up on the WP Admin by making
   the following modifications:
 * The following line can be updated to replace `create_function()` with an anonymous
   function:
    [https://plugins.trac.wordpress.org/browser/taboola/tags/1.0.10/taboola_widget.php#L55](https://plugins.trac.wordpress.org/browser/taboola/tags/1.0.10/taboola_widget.php#L55)
 * – Replace `create_function('', 'return register_widget("WP_Widget_Taboola");')`
   with `function() { return register_widget("WP_Widget_Taboola"); }`.
 * PHP4 style constructors are not allowed and `__construct()` should be used instead:
   
   [https://plugins.trac.wordpress.org/browser/taboola/tags/1.0.10/taboola_widget.php#L31](https://plugins.trac.wordpress.org/browser/taboola/tags/1.0.10/taboola_widget.php#L31)
 * – Replace `function TaboolaWP()` with `function __construct().`

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

 * ![](https://ps.w.org/taboola/assets/icon-256x256.png?rev=2113641)
 * [Taboola](https://wordpress.org/plugins/taboola/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/taboola/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/taboola/)
 * [Active Topics](https://wordpress.org/support/plugin/taboola/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/taboola/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/taboola/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Raam Dev](https://wordpress.org/support/users/raamdev/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/php-8-compatibility-66/)
 * Status: not resolved