{"id":15958242,"url":"https://github.com/marcfrederick/php-version-compare","last_synced_at":"2026-01-29T05:39:48.276Z","repository":{"id":255445406,"uuid":"851688731","full_name":"marcfrederick/php-version-compare","owner":"marcfrederick","description":"PHP-compatible version comparison for Python","archived":false,"fork":false,"pushed_at":"2024-10-24T12:34:51.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-25T07:43:26.932Z","etag":null,"topics":["php","python","version","version-check","versioning"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/php-version-compare","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marcfrederick.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2024-09-03T14:46:15.000Z","updated_at":"2024-10-24T12:34:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"5a8ed530-0a90-4712-8a86-f6a045ee172a","html_url":"https://github.com/marcfrederick/php-version-compare","commit_stats":{"total_commits":25,"total_committers":1,"mean_commits":25.0,"dds":0.0,"last_synced_commit":"c2c91d11adc55f921ee08677a7f70d677ccee596"},"previous_names":["marcfrederick/php-version-compare"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcfrederick%2Fphp-version-compare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcfrederick%2Fphp-version-compare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcfrederick%2Fphp-version-compare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcfrederick%2Fphp-version-compare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcfrederick","download_url":"https://codeload.github.com/marcfrederick/php-version-compare/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252825096,"owners_count":21809892,"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","python","version","version-check","versioning"],"created_at":"2024-10-07T14:02:19.646Z","updated_at":"2026-01-29T05:39:48.227Z","avatar_url":"https://github.com/marcfrederick.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# php-version-compare\n\n[![Test](https://github.com/marcfrederick/php-version-compare/actions/workflows/test.yml/badge.svg)](https://github.com/marcfrederick/php-version-compare/actions/workflows/test.yml)\n[![PyPI version](https://badge.fury.io/py/php-version-compare.svg)](https://badge.fury.io/py/php-version-compare)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/php-version-compare)](https://pypi.org/project/php-version-compare/)\n[![PyPI - License](https://img.shields.io/pypi/l/php-version-compare)](https://pypi.org/project/php-version-compare/)\n\n\u003e ℹ️ **Note**: This project is feature-complete and will only receive updates for bug fixes or compatibility with new\n\u003e Python versions. No new features are planned. If you require additional features, please consider forking the project.\n\nA simple Python library for comparing version strings in a manner compatible with PHP's\n[version_compare](https://www.php.net/manual/en/function.version-compare.php) function.\nAlthough this implementation is not derived from PHP's code, it passes the same tests to ensure compatibility.\n\n## Installation\n\nTo install `php-version-compare`, use pip:\n\n```bash\npip install php-version-compare\n```\n\n## Usage\n\n### Documentation\n\nThe complete documentation can be found on\n[Read the Docs](https://php-version-compare.readthedocs.io/).\n\n### Basic Usage\n\n```python\nfrom php_version_compare import version_compare\n\n# Without operator\nprint(version_compare('1.0', '1.1'))  # Output: -1\nprint(version_compare('1.1', '1.0'))  # Output: 1\nprint(version_compare('1.0', '1.0'))  # Output: 0\n\n# With operator\nprint(version_compare('1.1', '1.0.0', operator='\u003e='))  # Output: True\nprint(version_compare('1.0.0', '1.1', operator='\u003c='))  # Output: True\nprint(version_compare('1.0', '1.0', operator='!='))  # Output: False\n```\n\n## Contributing\n\n1. Fork the repository.\n2. Create a new branch (`git checkout -b feature-branch`).\n3. Make your changes.\n4. Commit your changes (`git commit -m 'Add new feature'`).\n5. Push to the branch (`git push origin feature-branch`).\n6. Open a pull request.\n\n### Running Tests\n\nTo run tests, make sure you have `tox` installed and run the following command, which will run the tests for all\nsupported Python versions that are installed on your system:\n\n```bash\ntox\n```\n\nIf you only want to run the tests for a specific Python version, you can specify the version:\n\n```bash\ntox -e py39\n```\n\n## License\n\nThis project is licensed under either of the following, at your option:\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or\n  [https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0))\n- MIT License ([LICENSE-MIT](LICENSE-MIT) or\n  [https://opensource.org/licenses/MIT](https://opensource.org/licenses/MIT))\n\nWhich license to use is up to you. This project is dual-licensed for compatibility with both.\nWhen contributing, you agree to license your contributions under the same terms.\n\n## Versioning\n\nThis project uses [Semantic Versioning](https://semver.org/). For the versions available, see\nthe [tags on this repository](https://github.com/marcfrederick/php-version-compare/tags) or the\n[releases page](https://github.com/marcfrederick/php-version-compare/releases).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcfrederick%2Fphp-version-compare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcfrederick%2Fphp-version-compare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcfrederick%2Fphp-version-compare/lists"}