3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('URL', '127.0.0.1/'); $filename = 'a č o.png'; echo '<a href="' . URL . 'file/show/' . rawurlencode($filename) . '" target="_blank"> Show file </a>' . "\n"; //gives link leading to: 127.0.0.1/file%2Fshow%2Fa č o.png $address = rawurlencode($filename); echo '<a href="' . URL . 'file/show/' . $address . '" target="_blank"> Show file </a>'; //gives link leading to: 127.0.0.1/file/show/a č o.png ?>
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 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.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
<a href="127.0.0.1/file/show/a%20%C4%8D%20o.png" target="_blank"> Show file </a> <a href="127.0.0.1/file/show/a%20%C4%8D%20o.png" target="_blank"> Show file </a>

preferences:
206.3 ms | 404 KiB | 213 Q