I'm aware there's a new PHP web framework that's somewhat similar to Astro, but I can't recall the name.
Astro gives you sensible defaults out of the box. It’s designed for modern web development, so things like partial hydration, automatic image optimisation, and using components from different frameworks just work.
And, also, "php" in your question could be ruby, go, C or anything else that runs on the server.
I prefer htmx or, better yet, Datastar which are both small, backend agnostic, js libraries for making ssr html interactive to varying degrees. You could, in theory, use astro with them but probably better to just use something else.
It’s php for javascript devs?
Astro needs to run on a server that can run node etc
And php can equally have its html cached.
It needs to run on your computer to generate the HTML, but you can just run npm run build then copy the contents from the dist folder to your apache server, or whether you want to host it.
At least, thats how I do it.
I haven't used PHP for about 20 years so I'm sure its changed a lot.
Do you know how you can do this in spring? Let's say I used Thymeleaf, is there a maven target I can use to walk over a database and generate every iteration of a html website?