xref: /PHP-7.3/ext/filter/tests/deprecated.phpt (revision c0407d95)
1--TEST--
2FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED are deprecated
3--SKIPIF--
4<?php
5if (!extension_loaded('filter')) die('skip filter extension not available');
6?>
7--FILE--
8<?php
9var_dump(filter_var('//example.com/', FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED));
10var_dump(filter_var('http://', FILTER_VALIDATE_URL, FILTER_FLAG_HOST_REQUIRED));
11?>
12===DONE===
13--EXPECTF--
14Deprecated: filter_var(): explicit use of FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED is deprecated in %s
15bool(false)
16
17Deprecated: filter_var(): explicit use of FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED is deprecated in %s
18bool(false)
19===DONE===
20