Title: create_function() is deprecated in PHP 7.2
Last modified: December 5, 2017

---

# create_function() is deprecated in PHP 7.2

 *  Resolved [yesenarman](https://wordpress.org/support/users/yesenarman/)
 * (@yesenarman)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/create_function-is-deprecated-in-php-7-2/)
 * Hello,
 * [create_function()](http://fi2.php.net/manual/en/function.create-function.php)
   was deprecated in PHP 7.2
 * There is one place it is used in Breadcrumb NavXT:
 * `add_action('widgets_init', create_function('', 'return register_widget("'. $
   this->unique_prefix . '_widget");'));`
 * Is it possible to replace it with anonymous function as suggested in the docs?
 * Sincerely,
    Arman

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [John Havlik](https://wordpress.org/support/users/mtekk/)
 * (@mtekk)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/create_function-is-deprecated-in-php-7-2/#post-9754626)
 * Thanks for bringing this to my attention. This will be fixed for the next release(
   6.0), I am tracking it in the following github issue: [https://github.com/mtekk/Breadcrumb-NavXT/issues/177](https://github.com/mtekk/Breadcrumb-NavXT/issues/177)
 *  Thread Starter [yesenarman](https://wordpress.org/support/users/yesenarman/)
 * (@yesenarman)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/create_function-is-deprecated-in-php-7-2/#post-9759739)
 * Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘create_function() is deprecated in PHP 7.2’ is closed to new replies.

 * ![](https://ps.w.org/breadcrumb-navxt/assets/icon.svg?rev=1927103)
 * [Breadcrumb NavXT](https://wordpress.org/plugins/breadcrumb-navxt/)
 * [Support Threads](https://wordpress.org/support/plugin/breadcrumb-navxt/)
 * [Active Topics](https://wordpress.org/support/plugin/breadcrumb-navxt/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/breadcrumb-navxt/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/breadcrumb-navxt/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [yesenarman](https://wordpress.org/support/users/yesenarman/)
 * Last activity: [8 years, 6 months ago](https://wordpress.org/support/topic/create_function-is-deprecated-in-php-7-2/#post-9759739)
 * Status: resolved