Question: what is the difference between java and php?
Answer: Since PHP is a server-side scripting language whereas Java is a general-purpose language. In other words, PHP is only used as a server-side language where Java is both for server-side and desktop programming language. ... On other hand, PHP is a dynamic typed language.