3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $url = "http://carkva-gazeta.org/римско-католическая-церковь/"; // in case it is https, we don't want to hardcode http $scheme = parse_url($url, PHP_URL_SCHEME); $host = parse_url($url, PHP_URL_HOST); // do not encode the first '/' or the last '/' $encodedPath = strtolowerurlencode(substr(parse_url($url, PHP_URL_PATH), 1, -1))); $encodedUrl = $scheme . "://" . $host . "/" . $encodedPath . "/"; echo $encodedUrl;
Output for 5.3.0 - 5.4.30
Parse error: syntax error, unexpected ')' in /in/NrFD6 on line 9
Process exited with code 255.