|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-04-15 16:42 UTC] cmb@php.net
[2021-03-12 12:41 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 13:00:02 2025 UTC |
Description: ------------ FILTER_VALIDATE_URLS rejects URLs starting with "phar:///". Test script: --------------- <?php var_dump(filter_var('file://c:/path/to/dir', FILTER_VALIDATE_URL)); var_dump(filter_var('file:///path/to/dir', FILTER_VALIDATE_URL)); var_dump(filter_var('phar://c:/path/to/dir', FILTER_VALIDATE_URL)); var_dump(filter_var('phar:///path/to/dir', FILTER_VALIDATE_URL)); Expected result: ---------------- string(21) "file://c:/path/to/dir" string(19) "file:///path/to/dir" string(21) "phar://c:/path/to/dir" string(19) "phar:///path/to/dir" Actual result: -------------- string(21) "file://c:/path/to/dir" string(19) "file:///path/to/dir" string(21) "phar://c:/path/to/dir" bool(false)