1#!/bin/bash 2 3cd $(dirname $0)/../../.. 4 5# prepare php environments 6sudo apt-get update && sudo apt-get install -y --force-yes php5 7sudo ln -sf /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h 8mkdir php_temp 9cd php_temp 10curl -sS https://getcomposer.org/installer | php 11sudo mv composer.phar /usr/local/bin/composer 12git clone https://github.com/php/php-src 13cd php-src && git checkout PHP-7.2.13 && ./buildconf --force 14./configure \ 15 --enable-bcmatch \ 16 --with-gmp --with-openssl \ 17 --with-zlib \ 18 --prefix=/usr/local/php-7.2 && \ 19make -j8 && sudo make install && make clean 20wget -O phpunit https://phar.phpunit.de/phpunit-7.phar && \ 21 chmod +x phpunit && \ 22 sudo cp phpunit /usr/local/php-7.2/bin 23sudo apt-get install -y --force-yes valgrind 24cd ../.. 25 26./tests.sh benchmark 27