phpprogrammer wrote:
Please give me some examples that how php is better than java
That's rather subjective, I cannot give you an example of something subjective.
1) php is very fast than jsp
I doubt very much that PHP outperforms JSP in every case. JSP may indeed, be significantly faster for certain types of operation.
That doesn't mean that Java is better though.
2) php dont need any third party tools (drivers or libraries ) to connect to different database servers.
Again, that's not necessarily true. A lot of databases need specific PHP libraries to be set up to be installed - they must in most cases use their native libraries- whereas Java's type IV JDBC drivers typically do not need the native libraries installed.
3) easy to learn and implement
Maybe there is a perception that PHP is somehow "easier" than Java. But you can shoot yourself in the foot easily with both of them.
4) number of lines for coding is less
Very possibly- but again, it depends on the exact techniques used.
5) external libraries are not required for curl, image creations, swf creations, pdf creations etc
A lot of those things DO need external libraries in PHP. curl has an equivalent (HTTP client) in Java which is built into the class library which does work (although it's a bit inflexible and with some bugs when I've used it).
Mark