{"id":21056039,"url":"https://github.com/xp-framework/tokenize","last_synced_at":"2026-02-07T17:31:44.544Z","repository":{"id":57084873,"uuid":"47652290","full_name":"xp-framework/tokenize","owner":"xp-framework","description":"Tokenize text","archived":false,"fork":false,"pushed_at":"2024-10-05T11:13:28.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-26T06:59:14.690Z","etag":null,"topics":["php","stream","tokenizer","xp-framework"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xp-framework.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":null,"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":"2015-12-08T22:02:29.000Z","updated_at":"2024-10-05T11:13:32.000Z","dependencies_parsed_at":"2024-02-25T14:32:41.749Z","dependency_job_id":"d0bbb927-6c10-4bf4-a8ce-6958c35eb7de","html_url":"https://github.com/xp-framework/tokenize","commit_stats":{"total_commits":28,"total_committers":1,"mean_commits":28.0,"dds":0.0,"last_synced_commit":"7019ee01d093ba08c44b826f5697a9045aa24ef3"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/xp-framework/tokenize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xp-framework%2Ftokenize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xp-framework%2Ftokenize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xp-framework%2Ftokenize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xp-framework%2Ftokenize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xp-framework","download_url":"https://codeload.github.com/xp-framework/tokenize/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xp-framework%2Ftokenize/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29201102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T16:28:23.579Z","status":"ssl_error","status_checked_at":"2026-02-07T16:28:22.566Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["php","stream","tokenizer","xp-framework"],"created_at":"2024-11-19T16:48:26.063Z","updated_at":"2026-02-07T17:31:44.528Z","avatar_url":"https://github.com/xp-framework.png","language":"PHP","readme":"Tokenize\n========\n\n[![Build status on GitHub](https://github.com/xp-framework/tokenize/workflows/Tests/badge.svg)](https://github.com/xp-framework/tokenize/actions)\n[![XP Framework Module](https://raw.githubusercontent.com/xp-framework/web/master/static/xp-framework-badge.png)](https://github.com/xp-framework/core)\n[![BSD Licence](https://raw.githubusercontent.com/xp-framework/web/master/static/licence-bsd.png)](https://github.com/xp-framework/core/blob/master/LICENCE.md)\n[![Requires PHP 7.0+](https://raw.githubusercontent.com/xp-framework/web/master/static/php-7_0plus.svg)](http://php.net/)\n[![Supports PHP 8.0+](https://raw.githubusercontent.com/xp-framework/web/master/static/php-8_0plus.svg)](http://php.net/)\n[![Latest Stable Version](https://poser.pugx.org/xp-framework/tokenize/version.svg)](https://packagist.org/packages/xp-framework/tokenize)\n\nTokenizing text\n\n```php\nuse text\\{StringTokenizer, StreamTokenizer};\nuse io\\File;\n\n// Supports strings and streams\n$tokens= new StringTokenizer('He asked: Can you parse this?', ' .?!,;:', true);\n$tokens= new StreamTokenizer((new File('parse-me.txt'))-\u003ein(), ' .?!,;:', true);\n\n// Can iterate using foreach...\nforeach ($tokens as $token) {\n  Console::writeLine($token);\n}\n\n// ...or with an iterator API\nwhile ($tokens-\u003ehasMoreTokens()) {\n  Console::writeLine($tokens-\u003enextToken());\n}\n\n// Returns: [\"He\", \" \", \"asked\", \":\", \" \", \"Can\", \" \", \"you\", \" \", \"parse\", \" \", \"this\", \"?\"]\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxp-framework%2Ftokenize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxp-framework%2Ftokenize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxp-framework%2Ftokenize/lists"}