{"id":19535597,"url":"https://github.com/miyako/php","last_synced_at":"2025-08-08T12:13:37.894Z","repository":{"id":254227408,"uuid":"845880907","full_name":"miyako/php","owner":"miyako","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-15T01:33:10.000Z","size":45138,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-15T01:37:38.621Z","etag":null,"topics":["4d-class","4d-component","php"],"latest_commit_sha":null,"homepage":"https://miyako.github.io/php/","language":"4D","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/miyako.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,"zenodo":null}},"created_at":"2024-08-22T05:30:54.000Z","updated_at":"2025-05-15T01:31:25.000Z","dependencies_parsed_at":"2025-05-15T01:43:17.869Z","dependency_job_id":null,"html_url":"https://github.com/miyako/php","commit_stats":null,"previous_names":["miyako/php"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/miyako/php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2Fphp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2Fphp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2Fphp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2Fphp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miyako","download_url":"https://codeload.github.com/miyako/php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miyako%2Fphp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269417750,"owners_count":24413444,"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-08T02:00:09.200Z","response_time":72,"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":["4d-class","4d-component","php"],"created_at":"2024-11-11T02:19:15.935Z","updated_at":"2025-08-08T12:13:37.882Z","avatar_url":"https://github.com/miyako.png","language":"4D","funding_links":[],"categories":[],"sub_categories":[],"readme":"![version](https://img.shields.io/badge/version-20%20R5%2B-E23089)\n![platform](https://img.shields.io/static/v1?label=platform\u0026message=mac-intel%20|%20mac-arm%20|%20win-64\u0026color=blue)\n[![license](https://img.shields.io/github/license/miyako/php)](LICENSE)\n![downloads](https://img.shields.io/github/downloads/miyako/php/total)\n\n### Licensing\n\n* the source code of this component is licensed under the [MIT license](https://github.com/miyako/php/blob/master/LICENSE).\n* see [php.net](https://www.php.net/license/index.php) for the licensing of **PHP**.\n\nswitch to [`20.x`](https://github.com/miyako/php/tree/20.x) branch for 4D 20 LTS compatible version.\n\n### Compatibility\n\n![version](https://img.shields.io/badge/20%20R5%2B-E23089)\n\n*  [shared singleton](https://blog.4d.com/singletons-in-4d/)\n\n![version](https://img.shields.io/badge/20%20R3%2B-E23089)\n\n* [variadic function](https://blog.4d.com/a-fresh-approach-to-writing-variadic-functions/)\n\n# php\n\n## dependencies.json\n\n```json\n{\n\t\"dependencies\": {\n\t\t\"php\": {\n\t\t\t\"github\": \"miyako/php\",\n\t\t\t\"version\": \"latest\"\n\t\t}\n\t}\n}\n```\n\nBased on [miyako/4d-class-php](https://github.com/miyako/4d-class-php).\n\nThe CGI class has been refactored as a Shared Singleton.\n\n## Usage\n\n```4d\n$CGI:=cs.PHP.PHP_CGI.new(cs.PHP._PHP_CGI_Controller).cgi()\n\n$php:=\"\u003c?php\\n\\nfunction sum(int $a, int $b): int {\\nreturn $a + $b;\\n}\\n\"\n\n$phpFile:=Folder(fk desktop folder).file(\"test.php\")\n$phpFile.setText($php)\n\nvar $returnValue : Text\nIf (PHP Execute($phpFile.platformPath; \"sum\"; $returnValue; 5; 3))\n\tALERT($returnValue)\nEnd if\n```\n\nto test CGI mode\n\n```4d\n#DECLARE($params : Object)\n\nIf (Count parameters=0)\n\tCALL WORKER(1; Current method name; {})\nElse \n\t$form:=cs.PHP.CGI_PHPForm.new()\nEnd if\n```\n\nto test interactive\n\n```4d\n#DECLARE($params : Object)\n\nIf (Count parameters=0)\n\tCALL WORKER(1; Current method name; {})\nElse \n\t$form:=cs.PHP.Interactive_PHPForm.new()\nEnd if\n```\n\nto test one-shot\n\n```4d\n#DECLARE($params : Object)\n\nIf (Count parameters=0)\n\tCALL WORKER(1; Current method name; {})\nElse \n\t$form:=cs.PHP.Run_PHPForm.new()\nEnd if \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyako%2Fphp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiyako%2Fphp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiyako%2Fphp/lists"}