Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
We clone the KPHP
repository
In the folder with the turnip we do
Do not forget to install the necessary libraries.
We look at /kphp-kdb/objs/bin/kphp2cpp
There you can see
Run:
File [kphp/[email protected]] changed
File [kphp/xmain.cpp] changed
File [kphp/init_scripts.cpp] changed
File [kphp/init_scripts.h] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/[email protected]] changed
File [kphp/vars0.cpp] changed
File [kphp/vars.cpp] changed
Installed on Ubuntu 12.04.4 LTS
sudo apt-get install git-core openssl zlib1g-dev libcg libprcre3-dev
Install libre2:
wget re2.googlecode.com/files/re2-20140304.tgz
tar -zxvf re2-20140304.tgz
cd re2 /
make
make test (Ignore the error)
make install
make testinstall
cd /usr/local/src/
git clone https://github.com/vk-com/kphp-kdb
cd /usr/local/src/kphp- kdb/
make kphp
Check build: /usr/local/src/kphp-kdb/objs/bin/kphp2cpp
If everything is ok:
export KPHP_PATH=/usr/local/src/kphp-kdb
An example of compiling php to kphp:
For example, take a file bench.php
It lies here: https://gist.github.com/anonymous/9391146
Download, put.
mkdir /var/www/testkphp
cd /var/www/testkphp/
Compile bench.php into kphp
python /usr/local/src/kphp-kdb/KPHP/tests/kphp.py bench.php -o bench
After compilation, run
. /bench
We will see the table of tests.
Compare with php:
php bench.php Rejoice
!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question