proxy and php problem installing composer

I tried installing composer but I keep getting this error.
to note I am using a company laptop, so it has its own proxy which I added to the environment variables.

The Composer installer script was not successful [exit code 1].

Your proxy settings may be causing this error.

Script Output: The “https://getcomposer.org/versions” file could not
be downloaded: preg_split(): Passing null to parameter #3 ($limit) of
type int is deprecated php_network_getaddresses: getaddrinfo for
getcomposer.org failed: This is usually a temporary error during
hostname resolution and means that the local server did not receive a
response from an authoritative server. Failed to open stream:
php_network_getaddresses: getaddrinfo for getcomposer.org failed: This
is usually a temporary error during hostname resolution and means that
the local server did not receive a response from an authoritative
server