# microsoft/msphpsql

Microsoft Drivers for PHP for SQL Server

Repository: https://github.com/microsoft/msphpsql
Canonical: https://ross.abutalabs.com/products/msphpsql
Language: PHP
License: MIT
License Family: permissive
Topics: microsoft, php-extension, php-driver, microsoft-driver, sql-server
Last push: 2026-08-19T17:40:32+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 84, longevity 100
- inputs: {"age_days": 4516, "days_push": 14, "days_rel": 26, "gap_med": 61, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1884, forks 387 (observed 2026-08-28T04:05:48.932287+00:00)

## What it is
Microsoft's official PHP extensions (SQLSRV and PDO_SQLSRV) for reading and writing SQL Server data from PHP scripts, supporting SQL Server 2012+ and Azure SQL Database. The drivers rely on the Microsoft ODBC Driver for SQL Server for low-level communication.

## Use cases
- connect to SQL Server from a PHP application
- use PDO with SQL Server in PHP
- query Azure SQL Database from PHP scripts
- read and write SQL Server data from a PHP web app
- install a PHP driver for MSSQL on Linux or Windows
- migrate a PHP app from MySQL to SQL Server

## When to choose
- your PHP application must talk to SQL Server or Azure SQL
- you want Microsoft-supported, official drivers with PDO support
- you need pre-compiled PHP extensions for Windows or Linux

## When to avoid
- you use MySQL, PostgreSQL, or another database with native PDO drivers
- your PHP version is older than 8.3
- you cannot install the Microsoft ODBC Driver dependency

## Facets
- artifact type: library
- maturity: active
- function: database-driver, database
- domain: databases, web-development, backend
- platform: windows, php, cross-platform
- tags: sql-server, pdo, php-extension, azure-sql, odbc, linux

## Member repositories
- microsoft/msphpsql (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:48.932287+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:13:39.512525+00:00, confidence not recorded.
  - readme: https://github.com/microsoft/msphpsql (fetched 2026-08-28T04:05:48.932287+00:00, sha 3c65ed69d2da)
- Data as of 2026-08-30T08:39:29.467469+00:00.
