Title: PHP Deprecated
Last modified: February 18, 2018

---

# PHP Deprecated

 *  Resolved [webentwicklerin](https://wordpress.org/support/users/gbyat/)
 * (@gbyat)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/php-deprecated-6/)
 * Function create_function() is deprecated in /path/to/wordpress/wp-content/plugins/
   shariff/shariff.php on line 1491
 * `add_action( 'widgets_init', create_function( '', 'return register_widget("ShariffWidget");'));`
 * should be
 *     ```
       add_action( 'widgets_init', function(){
       	register_widget( 'ShariffWidget' );
       });
       ```
   
    -  This topic was modified 8 years, 4 months ago by [webentwicklerin](https://wordpress.org/support/users/gbyat/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [Jan-Peter](https://wordpress.org/support/users/starguide/)
 * (@starguide)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/php-deprecated-6/#post-10004405)
 * Hey gbyat,
 * anonymous functions would unfortunately break support for PHP 5.2 and since WordPress
   is still not dropping it, this would break peoples sites or I would need to add
   in checks to disable our plugin in case PHP 5.2 is present. On the good side,
   I already found a different way around, so that deprecated warning should be 
   gone with the next release.
 * Cheers
    Jan-Peter

Viewing 1 replies (of 1 total)

The topic ‘PHP Deprecated’ is closed to new replies.

 * ![](https://ps.w.org/shariff/assets/icon.svg?rev=2006307)
 * [Shariff Wrapper](https://wordpress.org/plugins/shariff/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shariff/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shariff/)
 * [Active Topics](https://wordpress.org/support/plugin/shariff/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shariff/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shariff/reviews/)

## Tags

 * [deprecated](https://wordpress.org/support/topic-tag/deprecated/)

 * 1 reply
 * 2 participants
 * Last reply from: [Jan-Peter](https://wordpress.org/support/users/starguide/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/php-deprecated-6/#post-10004405)
 * Status: resolved