{"id":13462524,"url":"https://github.com/syyongx/php2go","last_synced_at":"2025-05-14T21:03:04.914Z","repository":{"id":44686923,"uuid":"128157038","full_name":"syyongx/php2go","owner":"syyongx","description":"Use Golang to implement PHP's common built-in functions.","archived":false,"fork":false,"pushed_at":"2024-10-09T09:05:58.000Z","size":119,"stargazers_count":1650,"open_issues_count":3,"forks_count":310,"subscribers_count":43,"default_branch":"master","last_synced_at":"2025-04-03T06:48:10.455Z","etag":null,"topics":["go","php"],"latest_commit_sha":null,"homepage":"","language":"Go","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/syyongx.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":"2018-04-05T04:02:03.000Z","updated_at":"2025-03-28T09:12:30.000Z","dependencies_parsed_at":"2024-01-06T01:03:02.908Z","dependency_job_id":"abf74e1a-80f3-4ab6-b6de-d0904c077a84","html_url":"https://github.com/syyongx/php2go","commit_stats":{"total_commits":115,"total_committers":9,"mean_commits":"12.777777777777779","dds":"0.18260869565217386","last_synced_commit":"807d2bc24f0ef0fcbe9c5c1d8809286036816561"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syyongx%2Fphp2go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syyongx%2Fphp2go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syyongx%2Fphp2go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syyongx%2Fphp2go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syyongx","download_url":"https://codeload.github.com/syyongx/php2go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248208692,"owners_count":21065205,"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":["go","php"],"created_at":"2024-07-31T12:00:50.836Z","updated_at":"2025-04-10T11:34:36.673Z","avatar_url":"https://github.com/syyongx.png","language":"Go","funding_links":[],"categories":["Go","开源类库","Open source library","Uncategorized","Repositories"],"sub_categories":["开发辅助包","Development Aid Package","Uncategorized"],"readme":"# PHP2Go\n\n[![GoDoc](https://godoc.org/github.com/syyongx/php2go?status.svg)](https://godoc.org/github.com/syyongx/php2go)\n[![Go Report Card](https://goreportcard.com/badge/github.com/syyongx/php2go)](https://goreportcard.com/report/github.com/syyongx/php2go)\n[![MIT licensed][3]][4]\n\n[3]: https://img.shields.io/badge/license-MIT-blue.svg\n[4]: LICENSE\n\nUse Golang to implement PHP's common built-in functions. About 140+ functions have been implemented.\n\n## Install\n```shell\ngo get github.com/syyongx/php2go\n```\n\n## Requirements\nGo 1.10 or above.\n\n## PHP Functions\n\n### Date/Time Functions\n```php\ntime()\nstrtotime()\ndate()\ncheckdate()\nsleep()\nusleep()\n```\n\n### String Functions\n```php\nstrpos()\nstripos()\nstrrpos()\nstrripos()\nstr_replace()\nucfirst()\nlcfirst()\nucwords()\nsubstr()\nstrrev()\nnumber_format()\nchunk_split()\nstr_word_count()\nwordwrap()\nstrlen()\nstr_repeat()\nstrstr()\nstrtr()\nstr_shuffle()\ntrim()\nltrim()\nrtrim()\nexplode()\nstrtoupper()\nstrtolower()\nchr()\nord()\nnl2br()\njson_encode()\njson_decode()\naddslashes()\nstripslashes()\nquotemeta()\nhtmlentities()\nhtml_entity_decode()\nmd5()\nmd5_file()\nsha1()\nsha1_file()\ncrc32()\nlevenshtein()\nsimilar_text()\nsoundex()\nparse_str()\n```\n\n### Multibyte String Functions\n```php\nmb_strlen()\nmb_strtoupper()\n```\n\n### URL Functions\n```php\nbase64_encode()\nbase64_decode()\nparse_url()\nurlencode()\nurldecode()\nrawurlencode()\nrawurldecode()\nhttp_build_query()\n```\n\n### Array(Slice/Map) Functions\n```php\narray_fill()\narray_flip()\narray_keys()\narray_values()\narray_merge()\narray_chunk()\narray_pad()\narray_slice()\narray_rand()\narray_column()\narray_push()\narray_pop()\narray_unshift()\narray_shift()\narray_key_exists()\narray_combine()\narray_reverse()\nimplode()\nin_array()\n```\n\n### Mathematical Functions\n```php\nabs()\nrand()\nround()\nfloor()\nceil()\npi()\nmax()\nmin()\ndecbin()\nbindec()\nhex2bin()\nbin2hex()\ndechex()\nhexdec()\ndecoct()\nOctdec()\nbase_convert()\nis_nan()\n```\n\n### CSPRNG Functions\n```php\nrandom_bytes()\nrandom_int()\n```\n\n### Directory/Filesystem Functions\n```php\nstat()\npathinfo()\nfile_exists()\nis_file()\nis_dir()\nfilesize()\nfile_put_contents()\nfile_get_contents()\nunlink()\ndelete()\ncopy()\nis_readable()\nis_writeable()\nrename()\ntouch()\nmkdir()\ngetcwd()\nrealpath()\nbasename()\nchmod()\nchown()\nfclose()\nfilemtime()\nfgetcsv()\nglob()\n```\n\n### Variable handling Functions\n```php\nempty()\nis_numeric()\n```\n\n### Program execution Functions\n```php\nexec()\nsystem()\npassthru()\n```\n\n### Network Functions\n```php\ngethostname()\ngethostbyname()\ngethostbynamel()\ngethostbyaddr()\nip2long()\nlong2ip()\n```\n\n### Misc. Functions\n```php\necho()\nuniqid()\nexit()\ndie()\ngetenv()\nputenv()\nmemory_get_usage()\nmemory_get_peak_usage()\nversion_compare()\nzip_open()\nTernary(condition bool, trueVal, falseVal interface{}) interface{}\n```\n\n## LICENSE\nPHP2Go source code is licensed under the [MIT](https://github.com/syyongx/php2go/blob/master/LICENSE) Licence.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyyongx%2Fphp2go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyyongx%2Fphp2go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyyongx%2Fphp2go/lists"}