title: Is ZLIB support in PHP enabled by default or NOT?
body: <p>In the documentation of phpmanual it says:</p>
  
  <blockquote>
    <p>Zlib support in PHP is not enabled by default. You will need to
    configure PHP --with-zlib[=DIR]</p>
    
    <p>The Windows version of PHP has built-in support for this extension.
    You do not need to load any additional extensions in order to use
    these functions.</p>
  </blockquote>
  
  <p>So as it says it should be enabled by default only in the Windows version of PHP.</p>
  
  <p>But I install PHP and Apache on my linux machine from the repository, and then I noticed that it's already enabled. Used those commands:</p>
  
  <pre><code>sudo apt-get install apache2
  sudo apt-get install php5 php-pear
  </code></pre>
  
  <p>Does this mean that is also enabled by default if you install PHP from the repository?</p>
  
  <p>Also I tried to install PHP from source code without adding <code>--with-zlib[=DIR]</code> configuration, just to check will <code>zlib</code> be supported or not. According to documentation on phpmanual it shouldn't.</p>
  
  <p>I am not expert in compiling so I found tutorial for installing php from source code and I did next steps:</p>
  
  <pre><code>apt-get install libxml2-dev
  apt-get install build-essential
  
  wget http://in1.php.net/distributions/php-5.3.28.tar.bz
  tar -xvjf php-5.3.28.tar.bz
  cd php-5.3.28
  ./configure --prefix /usr/local/php5
  ------ I configure it without --with-zlib[=DIR]    ---------
  make
  make test
  make install
  </code></pre>
  
  <p>and as last I run this line to have it work with apache:</p>
  
  <pre><code>apt-get install libapache2-mod-php5
  </code></pre>
  
  <p>And after installing PHP on this way ZLIB support was again enabled by default.</p>
  
  <p>If you are asking yourself how am I checking is it enabled or not, here is the answer.</p>
  
  <p>I am checking it <code>phpinfo();</code> and it always says it is enabled:</p>
  
  <p><img src="https://i.stack.imgur.com/6jEDG.jpg" alt="enter image description here"></p>
  
  <p>And also I was checking for few function from this library:</p>
  
  <pre><code>if(function_exists('gzdeflate'))
  {
      echo 'ZLIB is supported';
  }
  else
  {
      echo 'ZLIB is not supported';
  }
  //the result is always 'ZLIB is supported'
  
  if(function_exists('gzencode'))
  {
     echo 'ZLIB is supported';
  }
  else
  {
      echo 'ZLIB is not supported';
  }
  //the result is always 'ZLIB is supported'
  </code></pre>
  
  <p>I am asking this because I have wordpress plugin. So as plugin it will be installed on many different servers.
  Now I want to start with using functions <code>gzinflate()</code> and <code>gzdeflate()</code> for one new feature. So I did research and some tests and was confused because documentation says it is not supported by default but when I install PHP on my server it is always supported by default.</p>
  
  <p>I really need to use those functions but I don't want to use them if it will not be supported on at least 99% of customers servers.</p>
  
  <p>So is documentation wrong or am I missing something. If I am missing something then can you help me with any alternative functions for compressing which will be supported on at least 99% of servers.</p>