Install PHP 7 and xdebug for development environement

PHP 7 was released

Compile PHP 7 from source for development environement

git clone git@github.com:php/php-src.git && cd php-src

./buildconf

./configure \
--with-freetype=/usr/local \
--with-config-file-path=/opt/php7/config.d \
--with-config-file-scan-dir=/opt/php7/conf.d \
--prefix=/opt/php7 \
--with-zlib-dir \
--with-freetype-dir \
--enable-mbstring \
--with-libxml-dir=/usr \
--enable-soap \
--enable-calendar \
--with-curl \
--with-mcrypt \
--with-zlib \
--with-gd \
--disable-rpath \
--enable-inline-optimization \
--with-bz2 \
--with-zlib \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-pcntl \
--enable-mbregex \
--with-mhash \
--enable-zip \
--with-pcre-regex \
--with-mysql \
--with-pdo-mysql \
--with-mysqli \
--with-png-dir=/usr \
--enable-gd-native-ttf \
--with-openssl \
--with-fpm-user=nginx \
--with-fpm-group=nginx \
--with-libdir=lib \
--enable-ftp \
--with-imap \
--with-imap-ssl \
--with-kerberos \
--with-gettext \
--with-gd \
--with-xpm-dir=/usr \
--with-ldap=/usr \
--with-jpeg-dir=/usr/lib/ \
--enable-fpm \
--with-fpm-user=www-data \
--with-fpm-group=www-data \


make
make test
make install

Install xdebug from sources, since there is no available binaries compatible with PHP7

  1. Download xdebug source archive
  2. Unzip the source code
  3. Check the PHP version /opt/php7/bin/phpize
  4. configure the compile process with this php version ./configure –with-php-config=/opt/php7/bin/php-config
  5. make
  6. make install
  7. Add the extension to ini file
  8. Configure xdebug
  9. xdebug.remote_enable=true
    xdebug.remote_port="<the port for XDebug to listen to>" (the default port is 9000)
    xdebug.remote_host=<the host where PhpStorm is running (e.g. localhost)>
    xdebug.remote_handler=dbgp 
    xdebug.remote_mode=req
    xdebug.idekey=PHPSTORM
    xdebug.profiler_enable=1
    xdebug.profiler_output_dir="<AMP home\tmp>"