homebrew – Upgrade of php not working on Late 2011 High Sierra

I have a late 2011 Macbook pro and want to setup my development environment.However, am struggling with php version. It is currently set to the default 7.1.16.

I was hoping to do it with brew, but I noticed that the version of brew I installed is for the latest versions of mac. So none of my brew commands are working.

How do update my php version without brew?

I tried with curl but when I check the version is still set to the default one.

curl -s https://php-osx.liip.ch/install.sh | bash -s 7.3

Or would there be a way to install a brew version that is compatible to High Sierra?