Title: php 7.2: create_function() deprecated
Last modified: January 13, 2018

---

# php 7.2: create_function() deprecated

 *  Resolved [ximun144](https://wordpress.org/support/users/ximun144/)
 * (@ximun144)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/php-7-2-create_function-deprecated/)
 * Hi, i am running a an apache server with php 7.2.1.
 * On a fresh wordpress install, i can’t activate events-manager plugin because 
   i’ve got an error: create_function() is deprecated.
 * I watched on php.net, they advice to use anonymous function instead.
    I tried
   to change the .php files from your plugin. For examples
 * `add_action('widgets_init', create_function('', 'return register_widget("EM_Widget_Calendar");'));`
 * into `add_action('widgets_init', function(){return register_widget("EM_Widget_Calendar");});`
 * each time `create_funtion()` is called.
 * and it seems to work. I don’t really know if it’s the right way to do… but i 
   give you the trick, in case…

Viewing 1 replies (of 1 total)

 *  Plugin Support [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * (@angelo_nwl)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/php-7-2-create_function-deprecated/#post-9864669)
 * thanks, we will going to test this out with this PHP 7.2.1 and inform the devs
   if needed

Viewing 1 replies (of 1 total)

The topic ‘php 7.2: create_function() deprecated’ is closed to new replies.

 * ![](https://ps.w.org/events-manager/assets/icon-256x256.png?rev=1039078)
 * [Events Manager - Calendar, Bookings, Tickets, and more!](https://wordpress.org/plugins/events-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/events-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-manager/reviews/)

 * 1 reply
 * 0 participants
 * Last reply from: [angelo_nwl](https://wordpress.org/support/users/angelo_nwl/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/php-7-2-create_function-deprecated/#post-9864669)
 * Status: resolved