{"id":16626696,"url":"https://github.com/derrabus/php-ereg-shim","last_synced_at":"2026-03-03T18:32:22.332Z","repository":{"id":54146758,"uuid":"115861942","full_name":"derrabus/php-ereg-shim","owner":"derrabus","description":"Replacement for the ereg legacy php extension","archived":false,"fork":false,"pushed_at":"2024-11-04T13:20:53.000Z","size":28,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-25T13:03:13.288Z","etag":null,"topics":["legacy","php","polyfill","regular-expressions","shim"],"latest_commit_sha":null,"homepage":null,"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/derrabus.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-31T12:32:05.000Z","updated_at":"2024-11-04T13:20:54.000Z","dependencies_parsed_at":"2023-12-02T08:27:13.478Z","dependency_job_id":"a3ec32f9-6e88-4ccb-aff5-3e7963e8d898","html_url":"https://github.com/derrabus/php-ereg-shim","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"03fec095cb2b303c073fd88bca12a4338b11566f"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/derrabus/php-ereg-shim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derrabus%2Fphp-ereg-shim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derrabus%2Fphp-ereg-shim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derrabus%2Fphp-ereg-shim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derrabus%2Fphp-ereg-shim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/derrabus","download_url":"https://codeload.github.com/derrabus/php-ereg-shim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derrabus%2Fphp-ereg-shim/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265904946,"owners_count":23846693,"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":["legacy","php","polyfill","regular-expressions","shim"],"created_at":"2024-10-12T04:11:26.301Z","updated_at":"2026-03-03T18:32:22.227Z","avatar_url":"https://github.com/derrabus.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# php ereg shim\n\nThis package emulates the old php extension for POSIX regular expressions\n(ereg) if it's not available. Internally, the PCRE extension is used to process\nregular expressions.\n\n## Requirements and Usage\n\nThe library requires php 5.3 or newer. To add it to your projects, simply add\n`derrabus/ereg-shim` to your composer dependencies.\n\n```\ncomposer require derrabus/ereg-shim\n```\n\nThis should auto-register the shim for you. However, it remains inactive as\nlong as the ereg extension is active. It should be safe to include it in\nprojects that should be tested on php 5 and php 7/8 simultaneously.\n\nYou can also force the usage of the shim implementation on php 5 by directly\ncalling the corresponding methods on the `Rabus\\EregShim\\Ereg` class.\n\nGlobal function call        | Forced shimmed function call\n--------------------------- | -------------------------------------------------\n`ereg('[0-9][^0-9]', '2a')` | `\\Rabus\\EregShim\\Ereg::ereg('[0-9][^0-9]', '2a')`\n\n## Purpose and limitations\n\nThis library can be helpful if you need to quicky migrate a legacy codebase to\nphp 7.0 and beyond. It will be slower than the native implementation and is not\nintended to be a permanent solution. Code that depends on the ereg extension\nshould be refactored to use the corresponding PCRE functions instead.\n\nThe library has been developed against the test suite of the php 5.6 ereg\nextension in order to get as close to the original behavior as possible. While\nPCRE and POSIX regular expressions are very similar, they're not 100%\ncompatible. There are certain edge cases that this library cannot cover.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderrabus%2Fphp-ereg-shim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderrabus%2Fphp-ereg-shim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderrabus%2Fphp-ereg-shim/lists"}