This file contains hidden or 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 | |
function rfc3986_validate_uri($uri) | |
{ | |
// Play around with this regexp online: | |
// http://regex101.com/r/hZ5gU9/1 | |
// Links to relevant RFC documents: | |
// RFC 3986: http://tools.ietf.org/html/rfc3986 (URI scheme) | |
// RFC 2234: http://tools.ietf.org/html/rfc2234#section-6.1 (ABNF notation) |