If you missed that argument when initially installing php5 and want to add it after the fact, this is all you need:
sudo apt-get install php5-readline
Para usar estas funções deve-se compilar as versões CGI ou CLI do PHP com suporte à readline. É necessário configurar o PHP com --with-readline[=DIR]. Para usar a libedit que substitui a extensão readline, configure o PHP com --with-libedit[=DIR].
No Windows, esta extensão está disponível por padrão a partir do PHP 7.1.0.
If you missed that argument when initially installing php5 and want to add it after the fact, this is all you need:
sudo apt-get install php5-readline
Use dotdeb. It's like 1 minute work.
Follow https://www.dotdeb.org/instructions/
Do only points 1,3,4 (omit 2)
and then
sudo apt-get install php5-readline