I'm returning a page slug created with two string variables like this in PHP:
$result = $site_url . '/' . $final_slug;
return $result;
But I've noticed that someone online did it like this:
return "$site_url/$final_slug";
Is the second version valid too, because it seems to work in my code?