PHP is a language designed for the web, adding a small piece of PHP code in a web page to create a dynamic part is very simple, so people starting from the "white sheet" and wanting to learn web development gladly starts with PHP because the results are immediate.

Java however requires, at a minimum, a good understanding of object-oriented programming, which is not the simplest for a neophyte in programming.

Best choices: PHP