PHP.Watch API for PHP Versions, Usage, RFC, and Changes
PHP.Watch provides up to date and manually verified information on PHP versions, releases and download links, changes in PHP version, RFCs, PHP version statistics, PHP symbols, and more via a free JSON API.
The information is extracted from official PHP Git repository, PHP builds, PHP.net web site, PECL builds, Packagist.org, WordPress.org, Drupal.org, and other various sources as well as manually entered data.
Summary
Data Points Available
- PHP Versions: A list of major PHP versions, each containing their bug fix/security fix status, release dates, EOL dates, and their active support end date. It also contains a small description for the each PHP version highlighting the major changes in that version. The description is provided in both plain text (in Markdown) and in HTML, which may contain links to PHP.Watch website.
- PHP Releases: A list of PHP releases including download links for Windows, indicating whether it's a security release or a bug fix release, and their support/development/EOL status.
- Changes in PHP Versions: A list of new features, changed features, deprecations, and removed features. The list also links to individual pages in PHP.Watch that provides detailed information. The list is provided on best-effort basis, and may not contain all of the changes. The change sets are available for upcoming PHP versions as well.
- PHP RFCs: A list of PHP RFCs that are currently in voting, approved, implemented, or declined. RFCs under discussion and draft status are not included. It contains information such as creation date, link to PHP.net Wiki, link to PHP.Watch RFC listing, vote outcome, and voting status including vote start and end dates as well as the vote counts. Vote counts only include RFCs that poll yes/no status, and more complex RFCs may not contain their vote status.
- PHP version statistics: Contains PHP versions, and their current usage status. This information is sourced from Packagist.org, WordPress.org, and Drupal.org.
- PHP Symbols: List of PHP symbols and features, and their status, availability percentages, and more. This includes PHP symbols such as functions, classes and constants, and features such as extensions and major changes (such as
readonly
support,jit
, and more). This section is where the majority of the effort is put, and is majorly updated and reviewed manually. This API endpoint aims to be close to a CanIUse API.
API characteristics
- The API always returns standard JSON data, with a
Content-Type: application/data
header. - All plain-HTTP requests will be redirected to HTTPS.
- All HTTPS connections support ECDSA and RSA certificates.
- API response HTTP codes follow the standard status codes such as
200
for success,404
for not found, etc. If the request contains anAccept
header requesting JSON or XML, the error responses will be in that content type (JSON/XML) as well. Otherwise, all error pages will be in HTML. - All of the responses contain a description, the API URL, and the requested data in the
data
key in the response object. - All of the date formats are in
YYYY-MM-DD
format. - All text label and description fields, otherwise indicated, contains plain text. However, it is recommended to sanitize the description fields for a good measure.
- All fields indicated with
.html
suffix in the field name may contain simple HTML. They are used to indicate PHP symbols as well as links to certain pages on PHP.Watch as absolute links.
Response Format
All of the API responses will be in the following format. The data
key contains the requested data either as an array or an object.
curl 'https://php.watch/api/v1/versions'
{
"data": {},
"_documentation": "https:\/\/php.watch\/api#versions",
"_description": "Latest PHP versions, along with their support\/security\/EOL status and release\/EOL\/active dates."
}
PHP Versions API
PHP Versions API provides a list of PHP versions (such as 7.4
, 8.2
) along with their important information and current status.
API response contains an object, with each key being the PHP version ID, and the value being an object containing the information about that version.
{
"data": {
"80300": {
"versionId": 80300,
"name": "8.3",
"releaseDate": null,
"isEOLVersion": false,
"isSecureVersion": false,
"isLatestVersion": false,
"isFutureVersion": true,
"isNextVersion": true,
"statusLabel": "Upcoming Release"
},
"80200": {
"versionId": 80200,
"name": "8.2",
"releaseDate": "2022-12-08",
"isEOLVersion": false,
"isSecureVersion": true,
"isLatestVersion": true,
"isFutureVersion": false,
"isNextVersion": false,
"statusLabel": "Supported (Latest)"
}
},
"_documentation": "https:\/\/php.watch\/api#versions",
"_description": "Latest PHP versions, along with their support\/security\/EOL status and release\/EOL\/active dates."
}
The data
value will always be an object containing the only version or multiple versions.
Key | Data type | Description |
---|---|---|
versionId |
integer |
The version ID of the PHP version. This value is equivalent to the PHP_VERSION_ID format. e.g PHP 7.4 is 70400 and PHP 8.3 is 80300 . |
name |
string |
The name of the PHP version. |
releaseDate |
string | null |
The release date of the PHP version if available, or null otherwise. |
activeSupportEndDate |
string | null |
The date when this version no longer receives bug fixes from official PHP development team. |
eolDate |
string | null |
The date when this version reaches its End-Of-Life. |
isEOLVersion |
boolean |
Whether this version has reached EOL. |
isSecureVersion |
boolean |
Whether this version receives security fixes from official PHP development team |
isLatestVersion |
boolean |
Whether this version is the latest active and supported version |
isFutureVersion |
boolean |
Whether this version is not yet released. It may include the upcoming (isNextVersion ) versions or releases with no fixed release date. |
isNextVersion |
boolean |
The active development version, but not generally-available. This version may be used to early test PHP applications. |
statusLabel |
string Enum | A human-friendly label to the version indicating its current status. The possible values are: Unsupported , Supported , Supported (Latest) , Security-Fixes Only , Upcoming Release , or Future Release |
In addition to the versions
endpoint that returns all PHP versions PHP.Watch tracks, the following endpoints are also available to filter the PHP versions by their status.
Endpoint URL | Description |
---|---|
https://php.watch/api/v1/versions |
All tracked PHP versions |
https://php.watch/api/v1/versions/secure |
PHP versions receiving security updates |
https://php.watch/api/v1/versions/supported |
PHP versions receiving security and bug fix updates |
https://php.watch/api/v1/versions/latest |
The latest and generally-available PHP version |
https://php.watch/api/v1/versions/next |
Upcoming PHP version, not yet Generally-available, but the source is available |