Can We create triggers and classes by php into salesforce. Can anyone please provide the appropriate guideline for this.Any code base guidance would really helpful?
If I understand your question correctly, you are asking if there is a way to 'port' PHP into Apex (write PHP to achieve results on the force.com platform without having to learn/write Apex).
As per the documentation, triggers and classes are written in Apex and compiled by the Apex Compiler. So the answer to your question is 'no'.
There are however some toolkits where you can use languages like Python and PHP amongst others to do some SOQL queries. Documentation here.
Hope this helps.