Just secure the machine you run it on should be enough... User on your website won't be able to get the sourcecode. You can hide the HTML Source code if you want so, but there are several tools to get the code anyway. Thus...
1. Secure your phpcode is possible, just secure the machine you run it on
2. You can not secure the sourcecode (html) generated by php.