Been there many times in PHP 4
function get_uri() is designed to prevent XSS exploits.
For example your website shows where people go and the uri has "><script>alert()</script>
then you know what might happen
The second is just plain and simple without security measurements.