> > > or https://psalm.dev/ (open source) are projects in that area > > (Matthew Brown is one of the authors of Psalm) > > > I don't like the idea of executing that on www.php.net for a few reasons, > but someone else mentioned the possibility of donated cpu time from > somewhere that's worth a conversation. > > > - A WebAssembly solution, e.g. https://phan.github.io/demo/ > > (forked from https://oraoto.github.io/pib/) (I'm one of the maintainers > of Phan) > > > Honestly, I like this solution best. There are drawbacks, and we'd > probably need to suppress it in certain reference chapters (e.g. mysql, > since there's no DB to talk to), but damn if it don't feel skippy trying it > out just now. (On my admittedly well connected, beefy dev workstation) > > -Sara >
I don't think Tyson was suggesting running Psalm on php.net, merely showing it as an example of a server-based approach. Ironically I added that server-based demo because I was so taken by the client-side one on hacklang.org which ran a version of Hack's typechecker transpiled from the original Ocaml (it sadly doesn't work any more). I think the WASM solution would be great. The 2MB download would be cached between pages, and a simple bit of JS would ensure it was only downloaded when a user wanted an interactive mode, and only on browsers that could run WASM. There'd also be the novelty of a mature language ecosystem relying on a new, hip, technology. All the kids would love it.