Title: Deprecated: Function create_function()
Last modified: February 16, 2018

---

# Deprecated: Function create_function()

 *  Resolved [almendron](https://wordpress.org/support/users/almendron/)
 * (@almendron)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/deprecated-function-create_function-3/)
 * Function create_function() is deprecated in PHP 7.2
 * **File duplicator/installer/build/classes/class.engine.php. Line 149:**
 * `$walk_function = create_function('&$str', '$str = "`$str`";');`
 * **File duplicator/views/tools/logging.php. Line 8:**
 * `usort($logs, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));`
 * **File duplicator/views/tools/diagnostics/logging.php. Line 8:**
 * `usort($logs, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));`
 * Can you solve it in the next version?
    -  This topic was modified 8 years, 3 months ago by [almendron](https://wordpress.org/support/users/almendron/).

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

 *  [Cory Lamle](https://wordpress.org/support/users/corylamleorg/)
 * (@corylamleorg)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/deprecated-function-create_function-3/#post-9983939)
 * Hey [@almendron](https://wordpress.org/support/users/almendron/),
 * Thanks for the feedback! If you can give the developer version a try it will 
   have the updates for this issue. The very latest version (1.2.33) can be found
   by following these instructions:
 *  – [Download Developer Version](https://downloads.wordpress.org/plugin/duplicator.zip)
   –
   Uninstall your current version and install this one.
 * Let me know if this solves your issue and we’ll get it out in the next version.
 * Thanks
 *  Thread Starter [almendron](https://wordpress.org/support/users/almendron/)
 * (@almendron)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/deprecated-function-create_function-3/#post-9984634)
 * **1) File duplicator/installer/build/classes/class.engine.php: OK**
 * **2) File duplicator/views/tools/logging.php. Line 8: Not solved**
 *     ```
       usort($logs, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));
       @chmod(DUP_Util::safePath($logs[0]), 0644);
       ```
   
 * Suggestion:
 *     ```
       usort($logs, function($a, $b) {
       	return filemtime($b) - filemtime($a);
       });
       @chmod(DUP_Util::safePath($logs[0]), 0644);
       ```
   
 * **3) File duplicator/views/tools/diagnostics/logging.php: OK**
 *  [Cory Lamle](https://wordpress.org/support/users/corylamleorg/)
 * (@corylamleorg)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/deprecated-function-create_function-3/#post-9985753)
 * My Bad… Actually
    duplicator/views/tools/logging.php is no longer used, it has
   now been removed.
 * Thanks for looking at that! Should go out next release…
 * Cheers~
 *  Thread Starter [almendron](https://wordpress.org/support/users/almendron/)
 * (@almendron)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/deprecated-function-create_function-3/#post-9985840)
 * Thank you again and my regards.
 *  [Cory Lamle](https://wordpress.org/support/users/corylamleorg/)
 * (@corylamleorg)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/deprecated-function-create_function-3/#post-9986065)
 * Thanks for closing out!

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

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

 * ![](https://ps.w.org/duplicator/assets/icon-256x256.png?rev=2906985)
 * [Duplicator - Backups & Migration Plugin - Cloud Backups, Scheduled Backups, & More](https://wordpress.org/plugins/duplicator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/duplicator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/duplicator/)
 * [Active Topics](https://wordpress.org/support/plugin/duplicator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/duplicator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/duplicator/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Cory Lamle](https://wordpress.org/support/users/corylamleorg/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/deprecated-function-create_function-3/#post-9986065)
 * Status: resolved