add_filter – create_function pb in PHP8

In general create_function should be replaced with a closure, like this:

add_filter('excerpt_more', function() {
    return "";
});

But in your specific case, you don’t even need that. WordPress has you covered already with a built-in function to use in a filter: __return_empty_string(). So you can just write:

add_filter('excerpt_more', '__return_empty_string' );

tech