{"id":13633493,"url":"https://github.com/zephir-lang/php-zephir-parser","last_synced_at":"2025-04-13T04:14:28.396Z","repository":{"id":44016581,"uuid":"86157342","full_name":"zephir-lang/php-zephir-parser","owner":"zephir-lang","description":"The Zephir Parser delivered as a C extension for the PHP language.","archived":false,"fork":false,"pushed_at":"2024-11-23T14:26:27.000Z","size":980,"stargazers_count":188,"open_issues_count":17,"forks_count":36,"subscribers_count":19,"default_branch":"development","last_synced_at":"2025-04-04T04:12:50.431Z","etag":null,"topics":["c","lalr","lemon","parser","parser-generator","php","php-api","php-extension","zend-engine","zephir","zephir-language","zephir-parser"],"latest_commit_sha":null,"homepage":"https://zephir-lang.com","language":"C","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/zephir-lang.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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-03-25T12:56:47.000Z","updated_at":"2025-02-24T05:25:29.000Z","dependencies_parsed_at":"2025-02-01T08:11:03.141Z","dependency_job_id":null,"html_url":"https://github.com/zephir-lang/php-zephir-parser","commit_stats":null,"previous_names":["phalcon/php-zephir-parser"],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zephir-lang%2Fphp-zephir-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zephir-lang%2Fphp-zephir-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zephir-lang%2Fphp-zephir-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zephir-lang%2Fphp-zephir-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zephir-lang","download_url":"https://codeload.github.com/zephir-lang/php-zephir-parser/tar.gz/refs/heads/development","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248198872,"owners_count":21063626,"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":["c","lalr","lemon","parser","parser-generator","php","php-api","php-extension","zend-engine","zephir","zephir-language","zephir-parser"],"created_at":"2024-08-01T23:00:46.711Z","updated_at":"2025-04-13T04:14:28.365Z","avatar_url":"https://github.com/zephir-lang.png","language":"C","funding_links":["https://opencollective.com/phalcon","https://opencollective.com/phalcon/"],"categories":["Internals"],"sub_categories":[],"readme":"# Zephir Parser\n\n[![Actions Status][actions badge]][actions link]\n[![Coverage Status][:badge-codecov:]][:build-codecov:]\n[![License][:badge-license:]][:ext-license:]\n[![Discord][:badge-discord:]][discord link]\n\nThe Zephir Parser delivered as a C extension for the PHP language.\n\nSupported PHP versions: **7.0**, **7.1**, **7.2**, **7.3**, **7.4**, **8.0**, **8.1** and **8.2**\n\n**NOTE:** The [`development`][:dev-branch:]\nbranch will always contain the latest **unstable** version. If you wish to\ncheck older versions or formal, tagged release, please switch to the\nrelevant [branch][:branches:]/[tag][:tags:].\n\n## Get Started\n\n**Build Requirements**\n\nPrerequisite packages are:\n\n* OS: Linux || Solaris || FreeBSD || macOS || Windows\n* Compiler: `g++` \u003e= 4.4 || `clang++` \u003e= 3.x || `vc++` \u003e= 11\n* [`re2c`][:re2c:] \u003e= 0.13.6\n\nTo build extension from the source you will need the PHP development headers.\nIf PHP was manually installed, these should be available by default.\nOtherwise, you will need to fetch them from a repository.\n\n### PECL\n\n```\npecl install zephir_parser\n```\n\n### Windows\n\nTo install Zephir Parser on Windows:\n\n1. Download [Zephir Parser for Windows][:latest-release:]\n2. Extract the DLL file and copy it to your PHP extensions directory\n3. Edit your `php.ini` file and add this line:\n   ```ini\n   [Zephir Parser]\n   extension=php_zephir_parser.dll\n   ```\n\n### Linux\n\nOn a Linux/Unix-based platform you can easily compile and install the\nextension from sources.\n\nFor Linux/Unix-based based systems you'll need also:\n\n* [GNU make][:gnu-make:] 3.81 or later\n* [autoconf][:gnu-autoconf:] 2.31 or later\n* [automake][:gnu-automake:] 1.14 or later\n\n#### Ubuntu\n\n```bash\nsudo apt-get install php7.0-dev gcc make re2c autoconf automake\n```\n\n#### Suse\n\n```bash\nsudo zypper install php7.0-devel gcc make re2c autoconf automake\n```\n\n### CentOS/Fedora/RHEL\n\n```bash\nsudo yum install php-devel gcc make re2c autoconf automake\n```\n\n## General Compilation\n\nFollow these instructions to generate a binary extension for your platform:\n\n```bash\ngit clone git://github.com/zephir-lang/php-zephir-parser.git\ncd php-zephir-parser\nphpize\n./configure\nmake\nsudo make install\n```\n\nIf you have multiple/specific PHP versions installed, you may be able to specify for which installation you'd like to\nbuild by using the `--with-php-config` option during configuration. For example:\n\n```bash\ngit clone git://github.com/zephir-lang/php-zephir-parser.git\ncd php-zephir-parser\n/usr/local/bin/phpize\n./configure --with-php-config=/usr/local/bin/php-config\nmake\nsudo make install\n```\n\nAdd the extension to your `php.ini`:\n\n```ini\n[Zephir Parser]\nextension=zephir_parser.so\n```\n\n## Usage\n\n```php\n$program = \u003c\u003c\u003cEOF\nnamespace Acme;\n\nclass Greeting\n{\n    public static function sayHello() -\u003e void\n    {\n        echo \"Hello, World!\";\n    }\n}\nEOF;\n\n$retval = zephir_parse_file($program, '(eval code)');\n\nvar_dump($retval);\n```\n\n## Sponsors\n\nBecome a sponsor and get your logo on our README on Github with a link to your site.\n[[Become a sponsor](https://opencollective.com/phalcon#sponsor)]\n\n\u003ca href=\"https://opencollective.com/phalcon/#contributors\"\u003e\n\u003cimg src=\"https://opencollective.com/phalcon/tiers/sponsors.svg?avatarHeight=48\u0026width=800\" alt=\"\"\u003e\n\u003c/a\u003e\n\n## Backers\n\nSupport us with a monthly donation and help us continue our activities.\n[[Become a backer](https://opencollective.com/phalcon#backer)]\n\n\u003ca href=\"https://opencollective.com/phalcon/#contributors\"\u003e\n\u003cimg src=\"https://opencollective.com/phalcon/tiers/backers.svg?avatarHeight=48\u0026width=800\u0026height=200\" alt=\"\"\u003e\n\u003c/a\u003e\n\n## License\n\nZephir Parser is open source software licensed under the MIT License (MIT).\nSee the [LICENSE][:ext-license:] file for more information.\n\n[actions link]: https://github.com/zephir-lang/php-zephir-parser/actions\n[actions badge]: https://github.com/zephir-lang/php-zephir-parser/actions/workflows/ci.yml/badge.svg\n\n[discord link]: http://phalcon.io/discord\n[:badge-discord:]: https://img.shields.io/discord/310910488152375297?label=Discord\u0026logo=discord\n[:badge-codecov:]: https://codecov.io/gh/zephir-lang/php-zephir-parser/branch/development/graph/badge.svg\n[:badge-license:]: https://img.shields.io/badge/license-MIT-brightgreen.svg\n[:build-codecov:]: https://codecov.io/gh/zephir-lang/php-zephir-parser\n[:ext-license:]: https://github.com/zephir-lang/php-zephir-parser/blob/master/LICENSE\n[:latest-release:]: https://github.com/zephir-lang/php-zephir-parser/releases/latest\n[:dev-branch:]:https://github.com/zephir-lang/php-zephir-parser/tree/development\n[:branches:]: https://github.com/zephir-lang/php-zephir-parser/branches\n[:tags:]: https://github.com/zephir-lang/php-zephir-parser/tags\n[:re2c:]: http://re2c.org\n[:gnu-make:]: https://www.gnu.org/software/make\n[:gnu-autoconf:]: https://www.gnu.org/software/autoconf/autoconf.html\n[:gnu-automake:]: https://www.gnu.org/software/automake\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzephir-lang%2Fphp-zephir-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzephir-lang%2Fphp-zephir-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzephir-lang%2Fphp-zephir-parser/lists"}