3v4l.org

run code in 300+ PHP versions simultaneously
<?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); $encodedPath = urlencode(substr(parse_url($url, PHP_URL_PATH), 1, -1)); $encodedUrl = $scheme . "://" . $host . "/" . $encodedPath . "/"; echo $encodedUrl;

preferences:
40.68 ms | 402 KiB | 5 Q