Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

The Zephir Parser delivered as a C extension for the PHP language.

License

NotificationsYou must be signed in to change notification settings

ice/zephir-parser

 
 

Repository files navigation

Actions StatusCoverage StatusLicenseDiscord

The Zephir Parser delivered as a C extension for the PHP language.

Supported PHP versions:7.0,7.1,7.2,7.3,7.4,8.0,8.1 and8.2

NOTE: Thedevelopmentbranch will always contain the latestunstable version. If you wish tocheck older versions or formal, tagged release, please switch to therelevantbranch/tag.

Get Started

Build Requirements

Prerequisite packages are:

  • OS: Linux || Solaris || FreeBSD || macOS || Windows
  • Compiler:g++ >= 4.4 ||clang++ >= 3.x ||vc++ >= 11
  • re2c >= 0.13.6

To build extension from the source you will need the PHP development headers.If PHP was manually installed, these should be available by default.Otherwise, you will need to fetch them from a repository.

PECL

pecl install zephir_parser

Windows

To install Zephir Parser on Windows:

  1. DownloadZephir Parser for Windows
  2. Extract the DLL file and copy it to your PHP extensions directory
  3. Edit yourphp.ini file and add this line:
    [Zephir Parser]extension=php_zephir_parser.dll

Linux

On a Linux/Unix-based platform you can easily compile and install theextension from sources.

For Linux/Unix-based based systems you'll need also:

Ubuntu

sudo apt-get install php7.0-dev gcc make re2c autoconf automake

Suse

sudo zypper install php7.0-devel gcc make re2c autoconf automake

CentOS/Fedora/RHEL

sudo yum install php-devel gcc make re2c autoconf automake

General Compilation

Follow these instructions to generate a binary extension for your platform:

git clone git://github.com/zephir-lang/php-zephir-parser.gitcd php-zephir-parserphpize./configuremakesudo make install

If you have multiple/specific PHP versions installed, you may be able to specify for which installation you'd like tobuild by using the--with-php-config option during configuration. For example:

git clone git://github.com/zephir-lang/php-zephir-parser.gitcd php-zephir-parser/usr/local/bin/phpize./configure --with-php-config=/usr/local/bin/php-configmakesudo make install

Add the extension to yourphp.ini:

[Zephir Parser]extension=zephir_parser.so

Usage

$program =<<<EOFnamespace Acme;class Greeting{    public static function sayHello() -> void    {        echo "Hello, World!";    }}EOF;$retval =zephir_parse_file($program,'(eval code)');var_dump($retval);

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site.[Become a sponsor]

Backers

Support us with a monthly donation and help us continue our activities.[Become a backer]

License

Zephir Parser is open source software licensed under the MIT License (MIT).See theLICENSE file for more information.

About

The Zephir Parser delivered as a C extension for the PHP language.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C49.4%
  • PHP43.0%
  • C++4.2%
  • M40.9%
  • Dockerfile0.9%
  • Makefile0.6%
  • Other1.0%

[8]ページ先頭

©2009-2025 Movatter.jp