Title: Call to undefined function create_function()
Last modified: February 19, 2023

---

# Call to undefined function create_function()

 *  [dtamajon](https://wordpress.org/support/users/dtamajon/)
 * (@dtamajon)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/call-to-undefined-function-create_function/)
 * This is an error raised on using PHP 8.x, on line 33 of file popularity-posts-
   widget.php.
 * This can be easily solved like this:
 * add_action(‘widgets_init’, ‘ppw_widgets_init’);
   function ppw_widgets_init() {
   return register_widget(“PopularityPostsWidget”);}
 * Would be nice to see that plugin working with PHP 8.x

The topic ‘Call to undefined function create_function()’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/popularity-posts-widget_ffffff.svg)
 * [Popularity Posts Widget](https://wordpress.org/plugins/popularity-posts-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/popularity-posts-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/popularity-posts-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/popularity-posts-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/popularity-posts-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/popularity-posts-widget/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [dtamajon](https://wordpress.org/support/users/dtamajon/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/call-to-undefined-function-create_function/)
 * Status: not resolved