So recently I was working on Laravel Lumen framework where we need PHP 7.1.3 version. In my OSX XAMPP was using php version 7.1.1
So here in this blog I am going to explain step by step procedure.
Step 1: Go to MAMP website and download the new version of PHP. Go to following link
On left side you will see column with title "Additional PHP versions"
There you will find list of PHP versions for OSX, download the one which you want and extract it. Copy it to
For example if you download php version 7.1.3 then you will get folder with name
Now you have to make two changes.
First edit path in your bash profile and update the existing path of PHP to newer version.