Title: Deprecated: Function create_function() is deprecated
Last modified: September 16, 2020

---

# Deprecated: Function create_function() is deprecated

 *  [leeannmckenzie12](https://wordpress.org/support/users/leeannmckenzie12/)
 * (@leeannmckenzie12)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/deprecated-function-create_function-is-deprecated-3/)
 * Hello,
 * I have noticed this message above my header on my home page “Deprecated: Function
   create_function() is deprecated in /home/customer/www/befreewithlee.com/public_html/
   index.php on line 3”
 * What does it mean and how do I get rid of it?
 * Thanks!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdeprecated-function-create_function-is-deprecated-3%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Sundar](https://wordpress.org/support/users/phptechie/)
 * (@phptechie)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/deprecated-function-create_function-is-deprecated-3/#post-13412716)
 * Hi,
 * In PHP 7.2.0, the “create_function()” is deprecated. So you should use Anonymous
   Function instead.
 * For example instead of something like this:
 * `$callback = create_function('', 'echo "'.str_replace('"', '\"', $section['text']).'";');`
 * You should create function like this:
 *     ```
       $callback = function() {
           echo str_replace('"', '\"', $section['text']);
       };
       ```
   
 * * Update all plugins & active theme with latest version release.
 * Thanks!
 *  Thread Starter [leeannmckenzie12](https://wordpress.org/support/users/leeannmckenzie12/)
 * (@leeannmckenzie12)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/deprecated-function-create_function-is-deprecated-3/#post-13412730)
 * Hey!
 * Thanks so much for your reply.
 * I have no idea how to change that? (I am not very good with the technical side
   of wordpress).
 * How do I add what you have mentioned to my site?
 * Lee-Ann
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [5 years, 8 months ago](https://wordpress.org/support/topic/deprecated-function-create_function-is-deprecated-3/#post-13414417)
 * Hmmm…. the wordpress “root” index.php file doesn’t create an functions. What’s
   in the file `/home/customer/www/befreewithlee.com/public_html/index.php`

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

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/deprecated-function-create_function-is-deprecated-3/#post-13414417)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
