Try to run `sudo apt update` first and see how it goes and if possible post the `ping mirrordirector.raspbian.org` result on paste.debian.net and give us the link. There is no package exactly named `php` but the php package available is as `php7.0`. So you are supposed to run `sudo apt install php7.0` instead of `sudo apt install php` and you can always search for a package (apt will intelligently show relevant or closely related package names if the exact one is not found) by `apt search package_name`