{"id":13616625,"url":"https://github.com/theseer/tokenizer","last_synced_at":"2025-05-11T03:47:36.123Z","repository":{"id":19559232,"uuid":"87337623","full_name":"theseer/tokenizer","owner":"theseer","description":"A small library for converting tokenized PHP source code into XML (and potentially other formats)","archived":false,"fork":false,"pushed_at":"2024-03-18T08:53:34.000Z","size":85,"stargazers_count":5190,"open_issues_count":0,"forks_count":22,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-08T01:04:57.477Z","etag":null,"topics":["php","tokenizer","xml"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theseer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["theseer"]}},"created_at":"2017-04-05T17:28:30.000Z","updated_at":"2025-05-06T08:15:18.000Z","dependencies_parsed_at":"2022-07-16T01:48:05.996Z","dependency_job_id":"ad3e8946-42ab-4f4d-9100-394b2520d6a1","html_url":"https://github.com/theseer/tokenizer","commit_stats":{"total_commits":47,"total_committers":8,"mean_commits":5.875,"dds":"0.23404255319148937","last_synced_commit":"7d7a71f05df89b45949f4198f006a21847856621"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theseer%2Ftokenizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theseer%2Ftokenizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theseer%2Ftokenizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theseer%2Ftokenizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theseer","download_url":"https://codeload.github.com/theseer/tokenizer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252978758,"owners_count":21834915,"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","tokenizer","xml"],"created_at":"2024-08-01T20:01:31.136Z","updated_at":"2025-05-08T01:08:32.498Z","avatar_url":"https://github.com/theseer.png","language":"PHP","readme":"# Tokenizer\n\nA small library for converting tokenized PHP source code into XML.\n\n[![Test](https://github.com/theseer/tokenizer/actions/workflows/ci.yml/badge.svg)](https://github.com/theseer/tokenizer/actions/workflows/ci.yml)\n\n## Installation\n\nYou can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):\n\n    composer require theseer/tokenizer\n\nIf you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:\n\n    composer require --dev theseer/tokenizer\n\n## Usage examples\n\n```php\n$tokenizer = new TheSeer\\Tokenizer\\Tokenizer();\n$tokens = $tokenizer-\u003eparse(file_get_contents(__DIR__ . '/src/XMLSerializer.php'));\n\n$serializer = new TheSeer\\Tokenizer\\XMLSerializer();\n$xml = $serializer-\u003etoXML($tokens);\n\necho $xml;\n```\n\nThe generated XML structure looks something like this:\n\n```xml\n\u003c?xml version=\"1.0\"?\u003e\n\u003csource xmlns=\"https://github.com/theseer/tokenizer\"\u003e\n \u003cline no=\"1\"\u003e\n  \u003ctoken name=\"T_OPEN_TAG\"\u003e\u0026lt;?php \u003c/token\u003e\n  \u003ctoken name=\"T_DECLARE\"\u003edeclare\u003c/token\u003e\n  \u003ctoken name=\"T_OPEN_BRACKET\"\u003e(\u003c/token\u003e\n  \u003ctoken name=\"T_STRING\"\u003estrict_types\u003c/token\u003e\n  \u003ctoken name=\"T_WHITESPACE\"\u003e \u003c/token\u003e\n  \u003ctoken name=\"T_EQUAL\"\u003e=\u003c/token\u003e\n  \u003ctoken name=\"T_WHITESPACE\"\u003e \u003c/token\u003e\n  \u003ctoken name=\"T_LNUMBER\"\u003e1\u003c/token\u003e\n  \u003ctoken name=\"T_CLOSE_BRACKET\"\u003e)\u003c/token\u003e\n  \u003ctoken name=\"T_SEMICOLON\"\u003e;\u003c/token\u003e\n \u003c/line\u003e\n\u003c/source\u003e\n```\n","funding_links":["https://github.com/sponsors/theseer"],"categories":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheseer%2Ftokenizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheseer%2Ftokenizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheseer%2Ftokenizer/lists"}