title: PHP: parse_url decodes characters
body: <p>so the problem is strange, cause it's happening on some systems only.</p>
  
  <p>If you have this line:</p>
  
  <pre><code>parse_url('/€?€#€')
  </code></pre>
  
  <p>On local system with PHP version 7.0.4 it gives me the following result:</p>
  
  <pre><code>array(3) {        
    ["path"]=&gt;      
    string(4) "/▒_▒"
    ["query"]=&gt;     
    string(3) "▒_▒" 
    ["fragment"]=&gt;  
    string(3) "▒_▒" 
  }     
  </code></pre>
  
  <p>Something like that is experienced here:</p>
  
  <p><a href="https://www.functions-online.com/parse_url.html" rel="nofollow">https://www.functions-online.com/parse_url.html</a>        </p>
  
  <p>Enter in the $url box:</p>
  
  <pre><code>/€?€#€
  </code></pre>
  
  <p>But here it's working just fine, although the PHP version is the same as on my machine:
  <a href="http://sandbox.onlinephpfunctions.com/" rel="nofollow">http://sandbox.onlinephpfunctions.com/</a></p>
  
  <p>Any idea why is that happening?</p>
  
  <p>The expected parsed url result should be:</p>
  
  <pre><code>array(3) {
    ["path"]=&gt;
    string(4) "/€"
    ["query"]=&gt;
    string(3) "€"
    ["fragment"]=&gt;
    string(3) "€"
  }
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>File encoding is UTF-8, PHP internal encodings are also UTF-8, everything that can be set on the server is already UTF-8.</p>