{"id":20209870,"url":"https://github.com/rask/php-ffi-examples","last_synced_at":"2025-08-24T13:21:13.647Z","repository":{"id":71398880,"uuid":"221661187","full_name":"rask/php-ffi-examples","owner":"rask","description":"Runnable examples to learn how PHP FFI works","archived":false,"fork":false,"pushed_at":"2019-11-26T23:41:00.000Z","size":7,"stargazers_count":35,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-20T11:10:41.850Z","etag":null,"topics":["examples","ffi","php"],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/rask.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2019-11-14T09:38:36.000Z","updated_at":"2025-02-07T10:46:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"fb644bdc-5a5c-45ee-be71-5df24fc6be65","html_url":"https://github.com/rask/php-ffi-examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rask/php-ffi-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rask%2Fphp-ffi-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rask%2Fphp-ffi-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rask%2Fphp-ffi-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rask%2Fphp-ffi-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rask","download_url":"https://codeload.github.com/rask/php-ffi-examples/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rask%2Fphp-ffi-examples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271873563,"owners_count":24837277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"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":["examples","ffi","php"],"created_at":"2024-11-14T05:43:08.449Z","updated_at":"2025-08-24T13:21:13.635Z","avatar_url":"https://github.com/rask.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP FFI Examples\n\nFFI is a new feature that ships with PHP 7.4. Previously FFI for PHP was available as\na standalone extension, but it has now been included in the main PHP installation.\n\nThis repository has examples for various PHP FFI use cases, along with some Rust\nexamples that display how to create PHP FFI compatible C-ABI libraries for PHP usage.\n\nThe examples are tied to a blog series which I am writing, and the examples are\nsplit into sections that resemble the blog series.\n\n## Requirements\n\nAll code should be runnable without adjustments, assuming you have the following\nprerequisites installed:\n\n-   PHP 7.4 with FFI enabled,\n-   Stable toolchain `rustc`/Cargo for compiling Rust libraries, the examples make\n    use of Cargo, but you can use `rustc` if you know how to use it.\n\nAll examples are accompanied with a short guide on how to run or compile them.\n\nThe code has been written and tested on Linux Ubuntu, so you may have to make slight\nadjustments to make them work in other environments properly.\n\nEach example in this repository is a standalone \"project\", meaning they run\nindependently from each other.\n\n## Licensing, modifying, and redistributing\n\nAll code provided in this repository is MIT licensed. These examples are meant to be\nused as a reference or a starting point for real applications. There is no real value\nin using the example code \"as is\", though I am not stopping you from doing that.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frask%2Fphp-ffi-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frask%2Fphp-ffi-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frask%2Fphp-ffi-examples/lists"}