one way will be to change the encoding of the text before you save and put it back when you need the original php code - I have not tried this, so I am not sure how far this will be successful.
Another way will be to write a code which will read your php file and crypt it, save it and then later when you need it, you should use a decrypt method to get back the php script. Take a look at the Mcrypt functions in php. This is a more better and feasible method but you need to do some work to set this up.http://www.php.net/manual/en/ref.mcrypt.php
None of the above methods are straight forward.