create_function() is deprecated since PHP 7.2, not needed anymore since 5.2 and removed in PHP 8. So there should be no reason to use it in Matomo
I did not test the functions in Date.php as honestly I don't understand what is going on there.
This pull request has been mentioned on Matomo forums. There might be relevant details there: