This is a C headers of the SDL2 adopted for PHP.
- PHP >= 8.1
Library is available as composer repository and can be installed using the following command in a root of your project.
$ composer require ffi-headers/sdl2-headers
use FFI\Headers\SDL2;
$headers = SDL2::create(
SDL2\Version::V2_24_2, // SDL2 Headers Version
);
echo $headers;
Please note that the use of header files is not the latest version:
- Takes time to download and install (This will be done in the background > during initialization).
- May not be compatible with the PHP headers library.