When you need to add your own php functions to drupal, you can simply embed them in the content, but that is not the best way.
The best way to add your own PHP functions to Drupal, would be to create your own function library module.
Lets hypothetically call your PHP function library "myfunctionlib", you will need to change that everywhere to reflect your own naming convention.
To create the PHP function library module first create a folder "myfunctionlib".
In that folder create a file called myfunctionlib.module with the following content:
In the same folder create another file called "myfunctionlib.info" with the following content:
"core" tells Drupal with which version of drupal the module works.
"version" tellds drupal what the version of this module is.
Upload the module folder "myfunctionlib" to the "sites/all/modules" folder, enable it on the modules administration page and call it where you want to use your php functions with;
For more information on creating modules, coding standards, etc., see the Module developer's guide.