First, confirm the path that PHP7.2 was installed at. In most of the cases, it should be /usr/local/opt/php@7.2, but may have some differences, if you’re not sure, go check the .*shrc(* = your shell, e.g. .zshrc, .bashrc) file, it should have a line like PATH="/usr/local/opt/php@7.2/bin.