plugins – wp_encode_emoji is not working

In a plugin development, need to store emojis in Database. but its not working

At sanitize plugin options function, we are planning to implement this

if ( function_exists('wp_encode_emoji') ) {
    $input($key) = wp_encode_emoji( $input($key) );
}
$input($key) = sanitize_textarea_field( $input($key) );