Yes and no.
phpinfo() is only considered to be a real security risk if an attacker were to view as it would assist them in finding out what you do and don't have and versions of many things such as modules.
With all that information and an exploit of their choice, it can be easier for them to...