Created
November 9, 2022 21:32
-
-
Save aleduca/625c5c41c16b380cc1123acb98d4774a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// errado | |
namespace app\helpers; | |
class Uri | |
{ | |
public static function get($type): string | |
{ | |
return parse_url($_SERVER['REQUEST_URI'][$type]); | |
} | |
} | |
// correto | |
namespace app\helpers; | |
class Uri | |
{ | |
public static function get($type): string | |
{ | |
return parse_url($_SERVER['REQUEST_URI'])[$type]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment