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)); $encodedUrl = $scheme . "://" . $host . "/" . $encodedPath; echo $encodedUrl;
Output for 5.1.2 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
http://carkva-gazeta.org/%D1%80%D0%B8%D0%BC%D1%81%D0%BA%D0%BE-%D0%BA%D0%B0%D1%82%D0%BE%D0%BB%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B0%D1%8F-%D1%86%D0%B5%D1%80%D0%BA%D0%BE%D0%B2%D1%8C%2F
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.1
Notice: Use of undefined constant PHP_URL_SCHEME - assumed 'PHP_URL_SCHEME' in /in/6mWQl on line 6 Warning: parse_url() expects exactly 1 parameter, 2 given in /in/6mWQl on line 6 Notice: Use of undefined constant PHP_URL_HOST - assumed 'PHP_URL_HOST' in /in/6mWQl on line 7 Warning: parse_url() expects exactly 1 parameter, 2 given in /in/6mWQl on line 7 Notice: Use of undefined constant PHP_URL_PATH - assumed 'PHP_URL_PATH' in /in/6mWQl on line 8 Warning: parse_url() expects exactly 1 parameter, 2 given in /in/6mWQl on line 8 :///

preferences:
241.76 ms | 403 KiB | 325 Q