I am making a college project and I dont want to give source code of few files, I want to know is it possible to hide source code of php of few pages?
This is possible, it's called obsfucation and you can find guides to it on the first page of Google. You do know that when a user loads a PHP page, they only receive the completed HTML, not the PHP used to generate it?
I have used MCrypt and these directions: http://www.itnewb.com/tutorial/PHP-Encryption-Decryption-Using-the-MCrypt-Library-libmcrypt