Title: PHP 7.2 Deprecated: Function create_function()
Last modified: February 10, 2018

---

# PHP 7.2 Deprecated: Function create_function()

 *  Resolved [idrasmine](https://wordpress.org/support/users/idrasmine/)
 * (@idrasmine)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/php-7-2-deprecated-function-create_function-2/)
 * Hi!
 * The insert-pages plugin uses the create_function which is deprecated in PHP 7.2.
   
   Is there an easy way to replace the create_function call with something similar?
 * Regards
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-7-2-deprecated-function-create_function-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Paul Ryan](https://wordpress.org/support/users/figureone/)
 * (@figureone)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/php-7-2-deprecated-function-create_function-2/#post-10191847)
 * `create_function()` was introduced as a compatibility fix since some users are
   still on PHP < 5.4:
    [https://github.com/uhm-coe/insert-pages/commit/702d00a541351cf1f8bee557e6dd119e90ab40f4](https://github.com/uhm-coe/insert-pages/commit/702d00a541351cf1f8bee557e6dd119e90ab40f4)
 * I’ve removed both closures and `create_function()` so we are compatible with 
   PHP < 5.4 and PHP > 7.1 here:
    [https://github.com/uhm-coe/insert-pages/commit/8ba051fafb82f329d78231d7fbe677d7508a11b1](https://github.com/uhm-coe/insert-pages/commit/8ba051fafb82f329d78231d7fbe677d7508a11b1)
 * This fix will be included in the next version.

Viewing 1 replies (of 1 total)

The topic ‘PHP 7.2 Deprecated: Function create_function()’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/insert-pages.svg)
 * [Insert Pages](https://wordpress.org/plugins/insert-pages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-pages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-pages/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-pages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-pages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-pages/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Paul Ryan](https://wordpress.org/support/users/figureone/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/php-7-2-deprecated-function-create_function-2/#post-10191847)
 * Status: resolved