First, you need to get information about your PHP.
Make a test file with this code :
then you see a output like this :
Here, We have XAMPP, PHP 7.2.8 - x86 & TS.
Now, go to this link: github.com/Microsoft/msphpsql
Find your OS & PHP version in production release. (We select Windows-7.2.zip)
Extract downloaded file, we go to x86 folder then copy php_pdo_sqlsrv_72_ts.dll & php_sqlsrv_72_ts.dll to xampp/PHP/ext.
Open php.ini file xampp/php/php.ini (If not exists, rename php.ini-development to php.ini)
Insert the codes after extension = pdo_mysql (Change filename to your version)
Restart your web server. (Apache, Nginx or etc)
Open your phpinfo again, now in the "Registered PHP Streams" section you have sqlsrv & you can search & find pdo_sqlsrv in your phpinfo.
Now you can use the sqlsrv_connect function to connect your SQL Server.
For PDO connection you can use this :
Sincerely, The MasterkinG32 Team