- Install phpenv
- Download bison 2.7 and install it http://mirror.esc7.net/pub/Ubuntu/pool/main/b/bison/
cd ~/.phpenv
cd libexec
vim phpenv-install
- Here is the most important part, we need to add more options to CONFIGURE_OPTIONS CONFIGURE_OPTIONS="--with-readline --enable-phpdbg"
phpenv install php-5.6.2
At the time this post is published, the latest version of PHP is 5.6.2, you can change that.
cd /path/to/your/index.php
phpenv local 5.6.2
- Remember to restore configure options if you want to install other version of php via phpenv