For PHP, they will do their best.
However, if you are referring to page compression back to clients, you will also need to check its inclusion in apache (if you use apache, you will need mod_gzip.c or mod_deflate.c modules).
For example: # httpd -l (apache 2)
I also noticed a mention of the need to implement .htaccess overrides in the past:
#compress all text & html: AddOutputFilterByType DEFLATE text/html text/plain text/xml # Or, compress certain file types by extension: <Files *.html> SetOutputFilter DEFLATE </Files>
source share