{"id":16275223,"url":"https://github.com/ghostff/php_prettify","last_synced_at":"2025-03-20T01:30:48.693Z","repository":{"id":62510559,"uuid":"58017182","full_name":"Ghostff/php_prettify","owner":"Ghostff","description":"Outputs or returns html markup for a syntax highlighted version of the given PHP code ","archived":false,"fork":false,"pushed_at":"2021-12-04T02:45:05.000Z","size":188,"stargazers_count":12,"open_issues_count":3,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-26T06:22:12.180Z","etag":null,"topics":["php","php-prettify"],"latest_commit_sha":null,"homepage":"https://goo.gl/3pRbrP","language":"HTML","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/Ghostff.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}},"created_at":"2016-05-04T02:36:42.000Z","updated_at":"2024-04-26T06:22:12.181Z","dependencies_parsed_at":"2022-11-02T12:46:38.280Z","dependency_job_id":null,"html_url":"https://github.com/Ghostff/php_prettify","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ghostff%2Fphp_prettify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ghostff%2Fphp_prettify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ghostff%2Fphp_prettify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ghostff%2Fphp_prettify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ghostff","download_url":"https://codeload.github.com/Ghostff/php_prettify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219865986,"owners_count":16555917,"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","php-prettify"],"created_at":"2024-10-10T18:32:31.723Z","updated_at":"2024-10-10T18:32:32.337Z","avatar_url":"https://github.com/Ghostff.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Prettify \n\nCreates a syntax highlighted version of the given PHP code.\n\n```bash\n# PHP 8\ncomposer require ghostff/php_prettify\n\n# Older PHP version\ncomposer require ghostff/php_prettify:5.4.093021\ncomposer require ghostff/php_prettify:7.0.093021\n```\n\n```php\n\u003c?php\n\nuse PhpPrettify\\Highlight;\n\necho '\u003cpre\u003e', (new Highlight)-\u003erender('$name = \"foobar\"'), '\u003c/pre\u003e';\n````\n\n#### Highlighting a file\n```php\n\u003c?php\n\nuse PhpPrettify\\Highlight;\n\necho '\u003cpre\u003e', (new Highlight)\n        -\u003esetTheme('bittr')                             // Sets code highlight theme.\n        -\u003esetStyle('body {margin:0;padding:0}')         // Append css to default to style.\n        -\u003esetHighlight(22, ['style' =\u003e 'color:red'])    // Add html attributes to selected line(tr).\n        -\u003eshowLineNumber(1, false)                      // Show line number starting from line 1 and prevent selection of line number.\n        -\u003erender('code.txt', true),\n    '\u003c/pre\u003e';\n```\n\n![alt tag](https://github.com/Ghostff/php_prettify/blob/master/images/dark.png)   \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostff%2Fphp_prettify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghostff%2Fphp_prettify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostff%2Fphp_prettify/lists"}