Why php-imap slows down php?

Required package php-imap/php-imap. It requires the extension php-imap.
Installed: "yum install php71-php-imap"
After installation, the command "composer install" runs terribly slow (maybe a minute).
ie you need a set I haven't installed (php-imap/php-imap), but the problem is already there.

Once removed: "yum remove php71-php-imap", the problem disappears and runs composer install in 2 seconds.

UPD: the problem is not with the composer, but in General with php. And only in the CLI.
The command "php-v" is 5 seconds.
April 3rd 20 at 17:30
1 answer
April 3rd 20 at 17:32
The problem I have was just on the local dev.

Find out your hostname, for example with the command "hostname", write it to /etc/hosts for ip

the problem was solved

Find more questions by tags PHP