How I can secure my source code in php. Like in JSP we have class file.
Secure from what? You can also create class files in PHP but their not intended for security reasons just like their not in JSP.