How to install Zephir on Ubuntu?

I would like to install Zephir on my Ubuntu machine.

The goal is to convert some of my existing code into a PHP extension to take advantage of faster execution.

Any pointers are more than appreciated.

+4
source share
2 answers

Please note that Zephir is currently in the Alpha stage, and therefore errors can be expected.

It is necessary to install certain packages:

json-c re2c

At the command prompt, type:

sudo apt-get install libjson0 libjson0-dev libjson0-dbg sudo apt-get install re2c 

After installing the necessary packages, you can generate the parser as follows:

 ./generate 

Compile the extension (this is your code):

 ./zephir 

The generated code is placed in ext /, where you can perform standard compilation:

 cd ext/ sudo ./install 
0
source

Install zephir in Ubuntu ..

You need to download Zephir-master from https://github.com/phalcon/zephir

You downloaded json-c from https://github.com/json-c/json-c

1) sudo apt-get install gcc make re2c phpX phpX-json phpx-dev libpcre3-dev

2) Open the Json-c folder

2.1) sh autogen.sh

2.2) ./ configure

2.3) do && make install

3) Open the zephir-master folder

3.1) ./ install -c

4) zephir will help verify the installation

+1
source

Source: https://habr.com/ru/post/1498045/


All Articles