I assume you actually want to validate a bech32
address, not a "wallet" (a wallet is a collection of private keys).
The
BIP173 wiki page has links to some reference implementations of encoders/decoders here:
https://en.bitcoin.it/wiki/BIP_0173#Reference_implementationsUnfortunately, none of them are PHP... but perhaps they might give you some hints as to how to implement in PHP?