{"id":22164113,"url":"https://github.com/arshidkv12/zig-php","last_synced_at":"2026-01-03T21:00:57.159Z","repository":{"id":217311044,"uuid":"743550687","full_name":"arshidkv12/zig-php","owner":"arshidkv12","description":" PHP extension written in Zig","archived":false,"fork":false,"pushed_at":"2024-11-30T15:18:33.000Z","size":435,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-30T16:25:16.699Z","etag":null,"topics":["php","php-zig","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arshidkv12.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":"2024-01-15T13:30:05.000Z","updated_at":"2024-11-30T15:18:37.000Z","dependencies_parsed_at":"2024-11-20T16:20:30.808Z","dependency_job_id":"1a3fb3df-8ed9-47a0-a7f8-5b1ef461ed1f","html_url":"https://github.com/arshidkv12/zig-php","commit_stats":null,"previous_names":["arshidkv12/zig-php"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arshidkv12%2Fzig-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arshidkv12%2Fzig-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arshidkv12%2Fzig-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arshidkv12%2Fzig-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arshidkv12","download_url":"https://codeload.github.com/arshidkv12/zig-php/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227674031,"owners_count":17802303,"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","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":["php","php-zig","zig"],"created_at":"2024-12-02T05:02:29.017Z","updated_at":"2026-01-03T21:00:56.855Z","avatar_url":"https://github.com/arshidkv12.png","language":"Zig","readme":"# PHP Zig Extension Skeleton\n\nThis project provides a skeleton for building a PHP extension written in Zig. The goal of this project is to leverage Zig's performance and safety features within the PHP ecosystem. This guide will walk you through how to build and test the extension.\n\n## Requirements\n- **PHP**: You need a PHP installation with the ability to compile extensions (e.g., `phpize`).\n- **Zig**: Install the Zig programming language from [Zig's official site](https://ziglang.org/download/).\n- **GNU Make**: Required to build the extension.\n- **Autotools**: Required for `phpize` and `./configure`.\n\n### System Dependencies (Linux/macOS)\n```bash\nsudo apt-get install php-dev make autoconf\n# Or for macOS using Homebrew\nbrew install autoconf make php\n```\n\n[![Watch the video](https://img.youtube.com/vi/Q2KQDQWcXZU/0.jpg)](https://youtu.be/Q2KQDQWcXZU)\n\n## Installation Instructions\n1. Clone the repository:\n\n```\ngit clone https://github.com/arshidkv12/zig-php.git\ncd zig-php\n```\n\n2. Install PHP development headers and dependencies, such as phpize.\n3. Run the build process.\n\n## Building the Extension\n\nEdit build.zig file. Add correct cwd_relative php path.\n\nTo build it:\n\n1. `zig build`\n2. `phpize`\n3. `./configure`\n4. `make`\n\nTo test it:\n\n`php -d extension=./modules/my_php_extension.so -r \"echo hello_world();\"`\n\nShould output:\n\n`Hello from ZIG!`\n","funding_links":[],"categories":["Libraries","Interoperability"],"sub_categories":["FFI Bindings"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farshidkv12%2Fzig-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farshidkv12%2Fzig-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farshidkv12%2Fzig-php/lists"}