{"id":22873777,"url":"https://github.com/ponup/php-sdl","last_synced_at":"2026-03-07T02:32:49.458Z","repository":{"id":40312985,"uuid":"14923909","full_name":"Ponup/php-sdl","owner":"Ponup","description":"SDL2 bindings for the PHP language","archived":false,"fork":false,"pushed_at":"2023-08-06T21:14:15.000Z","size":706,"stargazers_count":114,"open_issues_count":13,"forks_count":22,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-06T19:06:57.304Z","etag":null,"topics":["c","hacktoberfest","php","sdl"],"latest_commit_sha":null,"homepage":"https://pecl.php.net/package/sdl","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ponup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-12-04T13:02:26.000Z","updated_at":"2025-04-18T19:40:06.000Z","dependencies_parsed_at":"2024-12-13T14:31:42.967Z","dependency_job_id":"3b74ab78-b7bb-4431-bd2a-f74a8481bc0d","html_url":"https://github.com/Ponup/php-sdl","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/Ponup/php-sdl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ponup%2Fphp-sdl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ponup%2Fphp-sdl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ponup%2Fphp-sdl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ponup%2Fphp-sdl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ponup","download_url":"https://codeload.github.com/Ponup/php-sdl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ponup%2Fphp-sdl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30206070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"online","status_checked_at":"2026-03-07T02:00:06.765Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","hacktoberfest","php","sdl"],"created_at":"2024-12-13T14:30:15.590Z","updated_at":"2026-03-07T02:32:49.425Z","avatar_url":"https://github.com/Ponup.png","language":"C","readme":"[![Build and test](https://github.com/Ponup/php-sdl/actions/workflows/build-test.yml/badge.svg)](https://github.com/Ponup/php-sdl/actions/workflows/build-test.yml)\n\nPHP-SDL\n=======\n\nSDL (Simple DirectMedia Layer) bindings for the PHP language. The extension allows you to create multimedia desktop applications with windows, input handling, events, and more.\n\n[\u003cimg src=\"input-handling-example.gif\" width=\"250\" /\u003e](input-handling-example.gif)\n\n## Installation\n\n### Requirements\n\n* C compiler\n* Automake tools\n* PHP8.1 devel\n* libSDL2 devel libraries and headers\n* UN*X OS (eg Linux, Macos)\n\n### Via PECL\n\n```bash\npecl install sdl-beta\n```\n\nThen add \n\n```\nextension=sdl.so\n```\nto your _php.ini_ file.\n\n\u003e If you have no idea about your ini file position you can run `php -i | grep ini` and see the list of you ini files.\n\n## Documentation\n\nThe SDL extension mimics in almost every single aspect to the official C library, so until we write our own documentation, refer to the [C counterpart](https://wiki.libsdl.org/APIByCategory).\n\n## Examples\n\nStandard SDL2 API is available in procedural style:\n\n```php\n$window = SDL_CreateWindow( \"Foo window\", 500, 50, 350, 300, SDL_WINDOW_SHOWN+SDL_WINDOW_RESIZABLE);\nSDL_SetWindowTitle($window, \"Some new title\");\nSDL_DestroyWindow($window);\n```\n\nComplete examples can be found in the [examples](examples) folder.\n\n## Related projects\n\n* [PHP-SDL_TTF](https://github.com/Ponup/php-sdl-ttf)\n* [PHP-SDL_Mixer](https://github.com/kea/php-sdl-mixer)\n* [PHP-SDL_Image](https://github.com/kea/php-sdl-image)\n* [PHP-OpenGL](https://github.com/ponup/php-opengl)\n* [PHP-OpenAL](https://github.com/Ponup/php-openal)\n\n## Projects using the extension\n\n* [CubeCraft](https://github.com/Ponup/cubecraft)\n* [Conway's game of life](https://github.com/Ponup/conways-game-of-life)\n* [PhpOkoban](https://github.com/b-viguier/PhpOkoban)\n* [Inphpinity](https://github.com/b-viguier/Inphpinity)\n* [PhPresent](https://github.com/b-viguier/PhPresent)\n\n## Building\n\nTo compile your new extension, you will have to execute the following steps:\n\n```bash\nphpize\n./configure [--with--sdl] \nmake\nmake test\nsudo make install\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fponup%2Fphp-sdl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fponup%2Fphp-sdl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fponup%2Fphp-sdl/lists"}