I am from Java EE background and learning PHP, so please advise me accordingly.
Does PHP tries to interpret the code every time it is requested? Or is there any modificationTestInterval of JSP? I am using PHP 5.4 with httpd on CentOS 5. It has Zend included. Does it do opcode caching automatically?
Please suggest optimization techniques if my code is not going to change frequently.
Theoretically yes, but at least in production you will use a bytecode cache (like APC) usually.
You can find it out with the builtin-function
phpinfo(). If there appearsapc, orxcache, then it’s enabled. Else you need to enable it first. You should be able to refer their manual for this step.