Title: Anonymous functions
Last modified: August 21, 2016

---

# Anonymous functions

 *  Resolved [AleksCee](https://wordpress.org/support/users/alekscee/)
 * (@alekscee)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/anonymous-functions/)
 * Hi,
 * could you please switch from “anonymous functions” to “normal functions” to support
   all versions of PHP, which are also supported by WordPress itself?
 * Thanks for the greate idea of this plugin.
 * [http://wordpress.org/extend/plugins/wp-fail2ban/](http://wordpress.org/extend/plugins/wp-fail2ban/)

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

 *  Plugin Author [invisnet](https://wordpress.org/support/users/invisnet/)
 * (@invisnet)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/anonymous-functions/#post-3657590)
 * May I ask why you’re not using at least PHP 5.3? I know some hosting companies
   take a little while to get around to upgrading, but surely 829 days is long enough?(
   [http://php.net/eol.php](http://php.net/eol.php))
 *  Thread Starter [AleksCee](https://wordpress.org/support/users/alekscee/)
 * (@alekscee)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/anonymous-functions/#post-3657595)
 * Hi,
 * because of the normal packet repository of “Ubuntu 8.04.4 LTS”. But you are right,
   I will upgrade the OS because the EOL of it in this month….
 *  [Erich Munz](https://wordpress.org/support/users/erich_k4wp/)
 * (@erich_k4wp)
 * [13 years ago](https://wordpress.org/support/topic/anonymous-functions/#post-3657769)
 * **related to eAccelerator**:
 * eAccelerator is not compatible with anonymous function/closure!
    more details
   here: [https://github.com/eaccelerator/eaccelerator/issues/12](https://github.com/eaccelerator/eaccelerator/issues/12)
 * so as a workaround:
 *     ```
       add_action( 'wp_login', 'fail2ban_onLogin' ,10,2);
       function fail2ban_onLogin($user_login, $user)
       {
       	openlog('wordpress('.$_SERVER['HTTP_HOST'].')',LOG_NDELAY|LOG_PID,LOG_AUTH);
       	syslog(LOG_INFO,"Accepted password for $user_login from {$_SERVER['REMOTE_ADDR']}");
       }
   
       add_action( 'wp_login_failed', 'fail2ban_onLoginFailed');
       function fail2ban_onLoginFailed($username)
       {
       	openlog('wordpress('.$_SERVER['HTTP_HOST'].')',LOG_NDELAY|LOG_PID,LOG_AUTH);
       	syslog(LOG_NOTICE,"Authentication failure for $username from {$_SERVER['REMOTE_ADDR']}");
       }
       ```
   

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

The topic ‘Anonymous functions’ is closed to new replies.

 * ![](https://ps.w.org/wp-fail2ban/assets/icon-256x256.png?rev=2814701)
 * [WP fail2ban - Advanced Security](https://wordpress.org/plugins/wp-fail2ban/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-fail2ban/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-fail2ban/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-fail2ban/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-fail2ban/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-fail2ban/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Erich Munz](https://wordpress.org/support/users/erich_k4wp/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/anonymous-functions/#post-3657769)
 * Status: resolved