{"id":28411735,"url":"https://github.com/coduo/php-to-string","last_synced_at":"2025-06-24T07:32:49.816Z","repository":{"id":16668518,"uuid":"19424218","full_name":"coduo/php-to-string","owner":"coduo","description":"Cast any php value into a string ","archived":false,"fork":false,"pushed_at":"2024-11-06T20:13:04.000Z","size":300,"stargazers_count":262,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"3.x","last_synced_at":"2025-06-03T06:10:45.643Z","etag":null,"topics":["cast","php","string"],"latest_commit_sha":null,"homepage":"","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/coduo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2014-05-04T10:28:40.000Z","updated_at":"2025-02-26T14:07:19.000Z","dependencies_parsed_at":"2024-06-18T12:33:58.406Z","dependency_job_id":"bf17dbf4-cd75-429d-97be-841307532314","html_url":"https://github.com/coduo/php-to-string","commit_stats":{"total_commits":43,"total_committers":6,"mean_commits":7.166666666666667,"dds":0.2790697674418605,"last_synced_commit":"efc94c0a929ec65f2e73161494c8968d53ca2e95"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/coduo/php-to-string","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coduo%2Fphp-to-string","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coduo%2Fphp-to-string/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coduo%2Fphp-to-string/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coduo%2Fphp-to-string/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coduo","download_url":"https://codeload.github.com/coduo/php-to-string/tar.gz/refs/heads/3.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coduo%2Fphp-to-string/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261628541,"owners_count":23186844,"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":["cast","php","string"],"created_at":"2025-06-02T18:47:46.355Z","updated_at":"2025-06-24T07:32:49.788Z","avatar_url":"https://github.com/coduo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP To String\n\nSimple library that converts PHP values into strings.\n\nStatus: \n\n![Build Status](https://github.com/coduo/php-to-string/workflows/Tests/badge.svg?branch=3.x)\n[![Latest Stable Version](https://poser.pugx.org/coduo/php-to-string/v/stable)](https://packagist.org/packages/coduo/php-to-string)\n[![Total Downloads](https://poser.pugx.org/coduo/php-to-string/downloads)](https://packagist.org/packages/coduo/php-to-string)\n[![Latest Unstable Version](https://poser.pugx.org/coduo/php-to-string/v/unstable)](https://packagist.org/packages/coduo/php-to-string)\n[![License](https://poser.pugx.org/coduo/php-to-string/license)](https://packagist.org/packages/coduo/php-to-string)\n\nSimple library that allows you to cast any php value into string\n\n## Installation\n\n```\ncomposer require coduo/php-to-string\n```\n\n## Usage\n\nSupported types:\n\n* string\n* integer\n* float/double\n* object\n* callable\n* array\n* resource\n\n```php\nuse Coduo\\ToString\\StringConverter;\n\n$string = new StringConverter('foo');\necho $string; // \"foo\"\n\n$double = new StringConverter(1.12312);\necho $double; // \"1.12312\"\n\n$integer = new StringConverter(1);\necho $integer; // \"1\"\n\n$datetime = new StringConverter(new \\DateTime());\necho $datetime; // \"\\DateTime\"\n\n$array = new StringConverter(['foo', 'bar', 'baz']);\necho $array; // \"Array(3)\"\n\n$res = fopen(sys_get_temp_dir() . \"/foo\", \"w\");\n$resource = new StringConverter($res);\necho $resource; // \"Resource(stream)\"\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoduo%2Fphp-to-string","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoduo%2Fphp-to-string","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoduo%2Fphp-to-string/lists"}