Alternative implementation without a lookup table to manage. The php files can be located inside the functions subdirectory and used directly. Abuse is avoided by having a stronger check for the name of the function. Only alphanumeric '-' and '_' are allowed in this implementation ('.' and '/' were removed to disallow relative paths: all functions must be located in a flat way inside the functions directory)
This implementation is far more practical in our case where we want to avoid the overhead of managing the tables with function ids.