From your log:
Creating config file /etc/php/7.0/mods-available/sysvmsg.ini with new version
Use of uninitialized value $reply in scalar chomp at /usr/share/perl5/Debconf/FrontEnd/Passthrough.pm line 66.
Use of uninitialized value $reply in concatenation (.) or string at /usr/share/perl5/Debconf/FrontEnd/Passthrough.pm line 67.
Use of uninitialized value $reply in split at /usr/share/perl5/Debconf/FrontEnd/Passthrough.pm line 68.
Use of uninitialized value $reply in scalar chomp at /usr/share/perl5/Debconf/FrontEnd/Passthrough.pm line 66.
Use of uninitialized value $reply in concatenation (.) or string at /usr/share/perl5/Debconf/FrontEnd/Passthrough.pm line 67.
Use of uninitialized value $reply in split at /usr/share/perl5/Debconf/FrontEnd/Passthrough.pm line 68.
Use of uninitialized value $reply in scalar chomp at /usr/share/perl5/Debconf/FrontEnd/Passthrough.pm line 66.
Use of uninitialized value $reply in concatenation (.) or string at /usr/share/perl5/Debconf/FrontEnd/Passthrough.pm line 67.
Use of uninitialized value $reply in split at /usr/share/perl5/Debconf/FrontEnd/Passthrough.pm line 68.
This seems to be a spurious bug that is discussed and fixed in bug 442941 as well as bug 1679435 but every now and then still seems to come up.
it is not a php issue - usually resolved with a retry, read the referenced bugs for more detail.
From your log: 7.0/mods- available/ sysvmsg. ini with new version perl5/Debconf/ FrontEnd/ Passthrough. pm line 66. perl5/Debconf/ FrontEnd/ Passthrough. pm line 67. perl5/Debconf/ FrontEnd/ Passthrough. pm line 68. perl5/Debconf/ FrontEnd/ Passthrough. pm line 66. perl5/Debconf/ FrontEnd/ Passthrough. pm line 67. perl5/Debconf/ FrontEnd/ Passthrough. pm line 68. perl5/Debconf/ FrontEnd/ Passthrough. pm line 66. perl5/Debconf/ FrontEnd/ Passthrough. pm line 67. perl5/Debconf/ FrontEnd/ Passthrough. pm line 68.
Creating config file /etc/php/
Use of uninitialized value $reply in scalar chomp at /usr/share/
Use of uninitialized value $reply in concatenation (.) or string at /usr/share/
Use of uninitialized value $reply in split at /usr/share/
Use of uninitialized value $reply in scalar chomp at /usr/share/
Use of uninitialized value $reply in concatenation (.) or string at /usr/share/
Use of uninitialized value $reply in split at /usr/share/
Use of uninitialized value $reply in scalar chomp at /usr/share/
Use of uninitialized value $reply in concatenation (.) or string at /usr/share/
Use of uninitialized value $reply in split at /usr/share/
This seems to be a spurious bug that is discussed and fixed in bug 442941 as well as bug 1679435 but every now and then still seems to come up.
it is not a php issue - usually resolved with a retry, read the referenced bugs for more detail.