Title: PHP Deprecated: Function create_function() is deprecated in&#8230;
Last modified: September 4, 2018

---

# PHP Deprecated: Function create_function() is deprecated in…

 *  [slomeli79](https://wordpress.org/support/users/slomeli79/)
 * (@slomeli79)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/php-deprecated-function-create_function-is-deprecated-in/)
 * `PHP Deprecated: Function create_function() is deprecated in /.../public_html/
   wp-content/plugins/search-everything/search-everything.php on line 236`
 * Will the plugin be updated anytime this year?

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

 *  [Preliot](https://wordpress.org/support/users/preliot/)
 * (@preliot)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/php-deprecated-function-create_function-is-deprecated-in/#post-11257784)
 * Tested my website with PHP 7.2 and also saw the same issue. This function is 
   used in one place:
 * search-everything.php > line 236
 *     ```
       $search_terms = array_filter(array_map( create_function( '$a', 'return trim($a, "\\"\'\\n\\r ");' ), $matches[0] ));
       ```
   
 * Perhaps use an anonymous function?
    -  This reply was modified 7 years, 3 months ago by [Preliot](https://wordpress.org/support/users/preliot/).
    -  This reply was modified 7 years, 3 months ago by [Preliot](https://wordpress.org/support/users/preliot/).
 *  [Preliot](https://wordpress.org/support/users/preliot/)
 * (@preliot)
 * [7 years ago](https://wordpress.org/support/topic/php-deprecated-function-create_function-is-deprecated-in/#post-11484632)
 * Fix (on your own risk). If you see an error, please comment here:
 *     ```
       //$search_terms = array_filter(array_map( create_function( '$a', 'return trim($a, "\\"\'\\n\\r ");' ), $matches[0] ));
   
       //Custom improvement
       $search_terms = array_filter(array_map( function($a) 
       {
           return trim($a, "\"'\n\r "); 
       }, $matches[0] ));
       ```
   
 *  [fraserbrown](https://wordpress.org/support/users/fraserbrown/)
 * (@fraserbrown)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/php-deprecated-function-create_function-is-deprecated-in/#post-11783798)
 * Works for me! Thanks for the tip
 *  [mukii](https://wordpress.org/support/users/mukii/)
 * (@mukii)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/php-deprecated-function-create_function-is-deprecated-in/#post-12207031)
 * Yeah, that thing also works for me. Thanks

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

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

 * ![](https://s.w.org/plugins/geopattern-icon/search-everything_242529.svg)
 * [Search Everything](https://wordpress.org/plugins/search-everything/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/search-everything/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/search-everything/)
 * [Active Topics](https://wordpress.org/support/plugin/search-everything/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/search-everything/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/search-everything/reviews/)

## Tags

 * [create_function](https://wordpress.org/support/topic-tag/create_function/)
 * [deprecated](https://wordpress.org/support/topic-tag/deprecated/)
 * [PHP 7.2](https://wordpress.org/support/topic-tag/php-7-2/)

 * 4 replies
 * 1 participant
 * Last reply from: [mukii](https://wordpress.org/support/users/mukii/)
 * Last activity: [6 years, 5 months ago](https://wordpress.org/support/topic/php-deprecated-function-create_function-is-deprecated-in/#post-12207031)
 * Status: not resolved