Home / Companies / Cloudflare / Blog / Post Details
Content Deep Dive

A New API Binding: cloudflare-php

Blog post from Cloudflare

Post Details
Company
Date Published
Author
Junade Ali
Word Count
1,231
Language
English
Hacker News Points
-
Summary

In September 2017, Cloudflare introduced a new official binding for PHP, which is available via Packagist as cloudflare/sdk. The design of the API was based on simple object composition to provide a more straightforward object model and higher flexibility. The package also uses Dependency Injection to allow different components in the API to vary independently. Additionally, it utilizes the PSR-7 standard for HTTP responses, making it easier to add further abstractions for additional HTTP clients and mock HTTP responses for unit testing.