MSSQL driver for PHP7

In PHP5, I download driver from microsoft and set it up in php.ini



It help me working fine to fetch data from MSSQL database both for Yii1 and Yii2.


‘dbAUSASLDATA’ => array(

        //'connectionString' => 'mssql:host=localhost;dbname=testdrive',

        'class' => 'CDbConnection',

        'connectionString' => 'sqlsrv:Server=ThatDBServerName;Database=ThatDatabaseName',

        //'emulatePrepare' => true,

        'username' => '',

        'password' => '',

        'charset' => 'utf8',

        'tablePrefix' => 'DBO.',



return [

'class' => 'yii\db\Connection',

'dsn' => 'sqlsrv:Server=ThatDBServerName;Database=ThatDatabaseName',

'username' => '',

'password' => '',

'charset' => 'utf8',

'tablePrefix' => 'DBO.',


However, I did not find latest sql dirver for PHP7 from microsoft website.

Do any one can give a hint of it?


Btw, It will be work by using ODBC.odbc:Driver={SQL Server};

I just wonder do sqlrv driver ready for PHP7?

PDO is in the works:

Ok, then I use ODBC firstly and wait until PDO ready in case want upgrade to PHP7 immediately.