druvu-lib-web 2.0.0 is out: a small Java web framework on Jetty 12 whose template language is PHP. Not "PHP-like" — the 2.0 engine runs real PHP 8 layouts: variables, every control structure, string interpolation, heredocs, includes, arrow functions, and 115 standard functions, with semantics settled by running whole templates against PHP 8 and matching its output byte for byte. There is no PHP runtime anywhere — the engine is Java, your handlers are Java, and request.setAttribute("customer", customer) becomes $customer in the page.
One thing is deliberately different from PHP: output is HTML-escaped by default, with raw() as the opt-out — forgetting is safe instead of being a hole. (That's also the main breaking change from 1.x.) Repo, docs and a runnable example: https://github.com/DenissLarka/druvu-lib-web. If you try it and a template renders differently than real PHP would — that's a bug by definition, and I want to hear about it.
Top comments (0)