How to add an anonymous function in wordpress hooks by removing create_function

The create_function is already an anonymous function, what/why would you like to change? (php.net)

Some other way to do something is (although untested):

$anon_func = function() {
    return register_widget("time_more_on_time_widget");
}

add_action('widgets_init', $anon_func );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)