Adding PHP function code to a node returns Eval error
You can try adding declaration of the function in your module.
But call it using php filter.

Moreover, in this case you will be able to edit code of your function with less chance of break the site.