在PHP中将代码拆分为标题/源文件

In C++, each class has a .h file and a .cpp file, is that possible in PHP?

The reason i want this for, is that when i give my class file to another person to use it I dont want him to view my source code,

I just want him to use the class without viewing the source.

No, PHP doesn't have an equivalent of header files. You may want something like http://www.ioncube.com or http://www.zend.com/en/products/guard/.

Really ask yourself why you're doing this before going down this route though.