In this case it doesn’t work in a nested bash because yum asks for the correct version of the php rpm.
You may install it via remi repo (that is used in nethserver-php-scl by @stephdl )
Please be careful as changing the systems php version may break your system, see Email Addresses link Doesn't work for instance. Don’t test on a production system.
yum install http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
yum install egroupware-epl --enablerepo=remi-php56
http://luchko.ca/~aaron/blog/?p=231
BTW, php 5.6 has reached EOL, to use PHP 7 use enablerepo=remi-php71
instead.
http://docs.nethserver.org/en/v7/release_notes.html#php-5-6-scl
Another way to workaround the package requirements would be installing egroupware from source: