Although the title is 18.10 installed PHP5.6, but I did not succeed.
High version of the Linux systems only support a growing high version of PHP, but most of the actual cms for high version of PHP is unfriendly, many functions do not support the site can easily lead to even unsuccessful installation are installed.
Back to the default download from the official website of Ubuntu is Ubuntu 18.04.3 big flaw, how do I install are not installed.
Internet, said the PPA is added
Then apt-get install php5.6
I actually did not succeed. I do not know why, after several rounds of tests will reduce future versions to Ubuntu16.04 then add ppa was successful.
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php5.6