PHP has types where it matters, input and output to functions (your api contract), but still have the good parts of a dynamic language. And you can add types as you go. Combined with an IDE like PhpStorm it is easy to refactor.
You can code in vanilla PHP if you want, because the standard library has everything you need, or you can pick any of the popular frameworks. It has large and mature community, you can pull in dependencies with composer, works better than npm, static analysis, test frameworks, database migration, authentication etc.
Performance is one of the better compared to the other dynamic languages like python or ruby, php is on par with nodejs depending on task.
One of the early selling points of nodejs was having the possibility to reuse code between frontend and backend, but in my opinion that is something I would not want to do in practice, because I don't want to expose my models and classes to the frontend, perhaps only for input validators like complex regexp.
Nodejs also suffers from shared memory within the same process, this can become a problem. Or the classic deadlock problem of one promise not ticking because everything happens concurrently, thus making your code more complex. If I would do nodejs I would probably use TypeScript, TypeScript is great, but it adds one extra build step. The worst part of nodejs is handling dependencies with npm (or yarn).
I can't see any benefit of using Java for building web, if you are building APIs and different services, sure use Java, but for web? It is too strict with it types, especially combined with the awful database layer JPA. Much more complex deployment with maven (or gradle), jars, artifacts etc. Java Spring became better with Spring Boot, but still too much bureaucracy like setting up your beans or combine the correct annotations (impossible to debug). Unfortunately much is done with annotations in spring, annotations is just voodoo magic that will bite you in the end (Spring have improved this somewhat with functional router instead of the old style class based plus annotations). You don't need to use jsp anymore for server side rendering, you can use thymeleaf, but still all that jar mess. Hot reload exist, you need to configure a bit if I remember correctly, but compared it to PHP, where you only reload the browser, it is much more complex.
If I wouldn't use PHP I probably use Go (a good option) or maybe nodejs (but rather not), but I would always do server side rendering, that alone will reduce complexity with a factor of thousands regardless of backend technology. Instead of doing the stupidity of
onload -> component 1 -> store -> HTTP -> Controller 1 -> DB -> entity -> JSON -> HTTP -> store -> template 1 -> HTML fragment
onload -> component 2 -> store -> HTTP -> Controller 2 -> DB -> entity -> JSON -> HTTP -> store -> template 2 -> HTML fragment
wait for all -> HTML document
instead becomes
HTTP -> controller -> component 1 & component 2 -> DB -> entity -> template 1 & template 2 -> HTML document
If you need to dynamically update one component from the frontend you can fetch it already rendered as a HTLM fragment with the same template and then directly swap it into the DOM, no need to jump thru hoops of JSON, stores and whatnots.
Here is short introduction to PHP I wrote a while back.
https://news.ycombinator.com/item?id=25222509