TL;DR: You can't install php5.6
on 14.04, consider upgrade releases.
Php 5.6 is still available on Ondrej's repository.
:~$ apt-cache policy php5.6
php5.6:
Installed: 5.6.40-6+ubuntu18.04.1+deb.sury.org+3
Candidate: 5.6.40-7+ubuntu18.04.1+deb.sury.org+1
Version table:
5.6.40-7+ubuntu18.04.1+deb.sury.org+1 500
500 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 Packages
500 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main i386 Packages
*** 5.6.40-6+ubuntu18.04.1+deb.sury.org+3 100
100 /var/lib/dpkg/status
The problem is you're using Ubuntu 14.04 which has reached End Of Life, it is recommended that you update to newer version.
The ppa maintainer has dropped support for Ubuntu 14.04, the supported releases is as follow:
- Ubuntu 16.04 Xenial
- Ubuntu 18.04 Bionic
- Ubuntu 18.10 Cosmic
- Ubuntu 19.04 Disco
You have to upgrade/fresh install above version of Ubuntu to get php5.6
working.
I think you'd want to upgrade to Xenial since it doesn't require any fresh installing method and can be upgraded directly.
Related How to install software or upgrade from an old unsupported release?