src/names.php: Use 'preg_replace_callback' function instead of 'preg_replace' with "/e modifier", as required/preferred by newer versions of PHP; add test-case for each function in names.php, too.
In template-related code and tests, use long form of PHP "open tag" (<?php instead of just <?) to avoid dependence on the 'short_open_tag' configuration setting.