apt-get install build-essential re2c bison git clone -b master https://github.com/php/php-src.git cd php-src curl https://github.com/php/php-src/pull/1018.patch | git am ./buildconf ./configure make sapi/cli/php ...