{"id":19895398,"url":"https://github.com/razshare/catpaw-php-go-interop","last_synced_at":"2026-05-09T20:04:49.356Z","repository":{"id":224336585,"uuid":"763024526","full_name":"razshare/catpaw-php-go-interop","owner":"razshare","description":"Call Go functions from Php.","archived":false,"fork":false,"pushed_at":"2024-03-04T17:49:28.000Z","size":5070,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-26T16:46:29.429Z","etag":null,"topics":["ffi","go","interoperability","php"],"latest_commit_sha":null,"homepage":"https://github.com/tncrazvan/catpaw/blob/master/docs/28.goffi.md","language":"PHP","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/razshare.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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-02-25T11:05:55.000Z","updated_at":"2024-02-25T11:22:12.000Z","dependencies_parsed_at":"2024-03-04T19:18:40.981Z","dependency_job_id":null,"html_url":"https://github.com/razshare/catpaw-php-go-interop","commit_stats":null,"previous_names":["tncrazvan/catpaw-php-go-interop","razshare/catpaw-php-go-interop"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/razshare/catpaw-php-go-interop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razshare%2Fcatpaw-php-go-interop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razshare%2Fcatpaw-php-go-interop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razshare%2Fcatpaw-php-go-interop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razshare%2Fcatpaw-php-go-interop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/razshare","download_url":"https://codeload.github.com/razshare/catpaw-php-go-interop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razshare%2Fcatpaw-php-go-interop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286079811,"owners_count":27282121,"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-11-25T02:00:05.816Z","response_time":54,"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":["ffi","go","interoperability","php"],"created_at":"2024-11-12T18:36:35.415Z","updated_at":"2025-11-25T02:11:01.466Z","avatar_url":"https://github.com/razshare.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Refer to [catpaw goffi](https://github.com/tncrazvan/catpaw/blob/master/docs/28.goffi.md) for more details.\n\nCompile the Go program with\n```sh\npushd src/lib/goffi \u0026\u0026 \\\ngo build -o main.so -buildmode=c-shared main.go \u0026\u0026 \\\ncpp -P ./main.h ./main.static.h \u0026\u0026 \\\npopd\n```\nPull your Php dependencies\n\n```sh\ncomposer update\n```\n\nThen run the Php program\n\n```sh\ncomposer prod:start\n```\n\nYou should see the following in your terminal\n\n```log\n\u003e @php -dopcache.enable_cli=1 -dopcache.jit_buffer_size=100M ./bin/start --libraries='./src/lib' --entry='./src/main.php'\nhello world\n```\n\n# Other notes\n\nThis has been tested on\n```log\nDistributor ID:\tZorin\nDescription:\tZorin OS 17\nRelease:\t17\nCodename:\tjammy\n```\n\n\nCurrently only the following primitives are automatically converted from Php to Go\n- string\n- int\n- float\n- bool\n\n# Gui\n\nThere's also a gui example in this repo, just uncomment this line \nhttps://github.com/tncrazvan/catpaw-php-go-interop/blob/6fddfae69d66d92c6901b8a656c97157740f959a/src/main.php#L27\nand run the program again, the result should look something like this\n![Peek 2024-03-02 00-07](https://github.com/tncrazvan/catpaw-php-go-interop/assets/6891346/009d1faa-2fa5-4763-9883-31cae87bb2db)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frazshare%2Fcatpaw-php-go-interop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frazshare%2Fcatpaw-php-go-interop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frazshare%2Fcatpaw-php-go-interop/lists"}