HTTP_HOST strlen wrong length <p>I'm trying to compare the <code>HTTP_HOST</code> with my domain name which failed. Struggling to find out what causes this, I tried to print the length of it. To my surprise it outputs the length of my actual domain name (although I am using a web proxy).</p> <p>Using <code>strlen</code> I would receive the same length as in this <code>var_dump()</code> output (showing only what's necessary):</p> <pre><code>["HTTP_HOST"]=&gt; string(12) "mydomain.com.s48.wbprx.com" ["SERVER_NAME"]=&gt; string(12) "mydomain.com.s48.wbprx.com" </code></pre> <p>My original domain was replaced with mydomain.com including the length of the string.</p> <p>I am very stunned, how come I can print the string using echo and see it in its whole, but not get the string length? Even when I did <code>str_replace('.','', $str)</code> it would return me <code>"mydomaincom"</code></p> <p>If it is to any help my website also uses the following htaccess code:</p> <pre><code>&lt;IfModule mod_rewrite.c&gt; RewriteEngine On RewriteBase / # Removes .php RewriteCond $1 !\.(gif|jpe?g|png|bmp)$ [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ $1.php [L] &lt;/IfModule&gt; </code></pre> <p>I've tried with both .php and without. Same result.</p> <p>This result was produced using: <a href="https://incloak.com/" rel="nofollow">https://incloak.com/</a></p> <p>My PHP version is <code>5.3.14</code> if that would make any difference.</p>