{"id":16760466,"url":"https://github.com/ryanve/phat","last_synced_at":"2026-06-27T23:32:02.083Z","repository":{"id":5808067,"uuid":"7022922","full_name":"ryanve/phat","owner":"ryanve","description":"PHP HTML utility module","archived":false,"fork":false,"pushed_at":"2014-02-02T05:14:00.000Z","size":504,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-11T21:07:07.756Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/ryanve.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-12-05T19:05:40.000Z","updated_at":"2017-06-02T10:02:50.000Z","dependencies_parsed_at":"2022-09-18T16:34:41.628Z","dependency_job_id":null,"html_url":"https://github.com/ryanve/phat","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/ryanve/phat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanve%2Fphat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanve%2Fphat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanve%2Fphat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanve%2Fphat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryanve","download_url":"https://codeload.github.com/ryanve/phat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanve%2Fphat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34872279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-27T02:00:06.362Z","response_time":126,"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":[],"created_at":"2024-10-13T04:23:36.700Z","updated_at":"2026-06-27T23:32:02.064Z","avatar_url":"https://github.com/ryanve.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [phat](../../)\n\nPHP HTML utility module.\n\n```php\nuse \\phat\\Html;\n\necho Html::tag('strong', ['class' =\u003e 'awesome'], 'It works');\n```\n\n## Methods\n\n- `Html::tag($tagname, $atts?, $inner?)` Get an html tag (closed only if `$inner` is not `null`). `$atts` is string|array.\n- `Html::atts($atts)` - Convert attributes into a properly encoded **string** for use in html. `$atts` is string|array.\n- `Html::parseAtts($atts)` - Convert attributes into an **array** for use in PHP.\n- `Html::esc($string)` - Escape a string for use in html. Ensure that entities are not double encoded.\n- `Html::encode($value)` - Encode a value into a string for use in an html attribute. Uses `esc` or [`json_encode`](http://php.net/manual/en/function.json-encode.php) as needed.\n- `Html::decode($value)` - Decode a value that was previously encoded via `encode` or [`json_encode`](http://php.net/manual/en/function.json-encode.php)\n- `Html::implode($values, $delimiter?)` - Deep implode. Defaults to SSV.\n- `Html::explode($values, $delimiter?)` - Explode by one or more delimiters. Defaults to SSV.\n- `Html::respace($text, $replacement?)` Replace or normalize whitespace.\n- `Html::rebreak($text, $replacement?)` Replace or normalize line breaks.\n- `Html::dom($html)` - Parse markup (or an array of nodes) into a `DOMDocument` object.\n- `Html::method($name)` - Get a fully-qualified method name for use like `array_map(Html::method('esc'), $array)`\n\n`_e` methods [echo](http://php.net/manual/en/function.echo.php) the result of the underlying function via overloading. For example: \n\n- `Html::esc_e($string)`\n- `Html::tag_e($tagname, $atts, $inner_html)`\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanve%2Fphat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanve%2Fphat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanve%2Fphat/lists"}