|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-08-30 15:16 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 08:00:01 2025 UTC |
Description: ------------ It seems that the scheme is always required for FILTER_VALIDATE_URL, whether or not FILTER_FLAG_SCHEME_REQUIRED is used - making the second flag redundant. Is this the expected behavior of FILTER_VALIDATE_URL? Does it never evaluate 'example.com' to true? --- From manual page: function.filter-var --- Reproduce code: --------------- --- From manual page: function.filter-var --- #1: <?php var_dump(filter_var('example.com', FILTER_VALIDATE_URL)); ?> #2: <?php var_dump(filter_var('example.com', FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED)); ?> Expected result: ---------------- I'd expect to see: #1: string(11) "example.com" #2: bool(false) Actual result: -------------- #1: bool(false) #2: bool(false)