<?php
$urls = array(
'http://www.website.com/path1/path2/file1.php?query1=true&query2=false',
'http://website.com/path1/path2/file1.php?query1=true&query2=false',
'http://website/path1/path2/file1.php?query1=true&query2=false',
'http://www.website.com/path1/path2/?query1=true&query2=false',
'http://website.com/path1/path2/?query1=true&query2=false',
'http://website/path1/path2/?query1=true&query2=false',
'http://www.website.com/path1/path2/',
'http://website.com/path1/path2/',
'http://website/path1/path2/',
'http://www.website.com?query1=true&query2=false',
'http://website.com?query1=true&query2=false',
'http://website?query1=true&query2=false',
'www.website.com/path1/path2/file1.php?query1=true&query2=false',
'website.com/path1/path2/file1.php?query1=true&query2=false',
'website/path1/path2/file1.php?query1=true&query2=false',
'www.website.com/path1/path2/?query1=true&query2=false',
'website.com/path1/path2/?query1=true&query2=false',
'website/path1/path2/?query1=true&query2=false',
'www.website.com/path1/path2/',
'website.com/path1/path2/',
'website/path1/path2/',
'www.website.com?query1=true&query2=false',
'website.com?query1=true&query2=false',
'website?query1=true&query2=false',
'https://www.website.com:443/path1/path2/file1.php?query1=true&query2=false',
'https://website.com:443/path1/path2/file1.php?query1=true&query2=false',
'https://website:443/path1/path2/file1.php?query1=true&query2=false',
'https://www.website.com:443/path1/path2/?query1=true&query2=false',
'https://website.com:443/path1/path2/?query1=true&query2=false',
'https://website:443/path1/path2/?query1=true&query2=false',
'https://www.website.com:443/path1/path2/',
'https://website.com:443/path1/path2/',
'https://website:443/path1/path2/',
'https://www.website.com:443?query1=true&query2=false',
'https://website.com:443?query1=true&query2=false',
'https://website:443?query1=true&query2=false',
'www.website.com:443/path1/path2/file1.php?query1=true&query2=false',
'website.com:443/path1/path2/file1.php?query1=true&query2=false',
'website:443/path1/path2/file1.php?query1=true&query2=false',
'www.website.com:443/path1/path2/?query1=true&query2=false',
'website.com:443/path1/path2/?query1=true&query2=false',
'website:443/path1/path2/?query1=true&query2=false',
'www.website.com:443/path1/path2/',
'website.com:443/path1/path2/',
'website:443/path1/path2/',
'www.website.com:443?query1=true&query2=false',
'website.com:443?query1=true&query2=false',
'website:443?query1=true&query2=false',
);
$flags = array(
'none' => null,
'scheme' => FILTER_FLAG_SCHEME_REQUIRED,
'scheme + host' => FILTER_FLAG_SCHEME_REQUIRED & FILTER_FLAG_HOST_REQUIRED,
'scheme + host + path' => FILTER_FLAG_SCHEME_REQUIRED & FILTER_FLAG_HOST_REQUIRED & FILTER_FLAG_PATH_REQUIRED,
'scheme + host + path + query' => FILTER_FLAG_SCHEME_REQUIRED & FILTER_FLAG_HOST_REQUIRED & FILTER_FLAG_PATH_REQUIRED & FILTER_FLAG_QUERY_REQUIRED,
'host' => FILTER_FLAG_HOST_REQUIRED,
'host + path' => FILTER_FLAG_HOST_REQUIRED & FILTER_FLAG_PATH_REQUIRED,
'host + path + query' => FILTER_FLAG_HOST_REQUIRED & FILTER_FLAG_PATH_REQUIRED & FILTER_FLAG_QUERY_REQUIRED,
'path' => FILTER_FLAG_PATH_REQUIRED,
'path + query' => FILTER_FLAG_PATH_REQUIRED & FILTER_FLAG_QUERY_REQUIRED,
'query' => FILTER_FLAG_QUERY_REQUIRED
);
foreach($urls as $url){
foreach($flags as $k => $flag){
echo "$url => $k :\r\n";
var_dump((bool) filter_var($url, FILTER_VALIDATE_URL, $flag));
}
echo "\r\n";
}
//test
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 33, Position 2 = 55
Branch analysis from position: 33
2 jumps found. (Code = 78) Position 1 = 34, Position 2 = 55
Branch analysis from position: 34
2 jumps found. (Code = 77) Position 1 = 35, Position 2 = 52
Branch analysis from position: 35
2 jumps found. (Code = 78) Position 1 = 36, Position 2 = 52
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
Branch analysis from position: 52
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
Branch analysis from position: 52
Branch analysis from position: 55
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 55
filename: /in/jZjF6
function name: (null)
number of ops: 57
compiled vars: !0 = $urls, !1 = $flags, !2 = $url, !3 = $flag, !4 = $k
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
2 0 E > ASSIGN !0, <array>
54 1 INIT_ARRAY ~6 null, 'none'
55 2 FETCH_CONSTANT ~7 'FILTER_FLAG_SCHEME_REQUIRED'
3 ADD_ARRAY_ELEMENT ~6 ~7, 'scheme'
56 4 FETCH_CONSTANT ~8 'FILTER_FLAG_SCHEME_REQUIRED'
5 FETCH_CONSTANT ~9 'FILTER_FLAG_HOST_REQUIRED'
6 BW_AND ~10 ~8, ~9
7 ADD_ARRAY_ELEMENT ~6 ~10, 'scheme+%2B+host'
57 8 FETCH_CONSTANT ~11 'FILTER_FLAG_SCHEME_REQUIRED'
9 FETCH_CONSTANT ~12 'FILTER_FLAG_HOST_REQUIRED'
10 BW_AND ~13 ~11, ~12
54 11 BW_AND ~14 ~13, 262144
12 ADD_ARRAY_ELEMENT ~6 ~14, 'scheme+%2B+host+%2B+path'
58 13 FETCH_CONSTANT ~15 'FILTER_FLAG_SCHEME_REQUIRED'
14 FETCH_CONSTANT ~16 'FILTER_FLAG_HOST_REQUIRED'
15 BW_AND ~17 ~15, ~16
54 16 BW_AND ~18 ~17, 262144
17 BW_AND ~19 ~18, 524288
18 ADD_ARRAY_ELEMENT ~6 ~19, 'scheme+%2B+host+%2B+path+%2B+query'
59 19 FETCH_CONSTANT ~20 'FILTER_FLAG_HOST_REQUIRED'
20 ADD_ARRAY_ELEMENT ~6 ~20, 'host'
60 21 FETCH_CONSTANT ~21 'FILTER_FLAG_HOST_REQUIRED'
54 22 BW_AND ~22 ~21, 262144
23 ADD_ARRAY_ELEMENT ~6 ~22, 'host+%2B+path'
61 24 FETCH_CONSTANT ~23 'FILTER_FLAG_HOST_REQUIRED'
54 25 BW_AND ~24 ~23, 262144
26 BW_AND ~25 ~24, 524288
27 ADD_ARRAY_ELEMENT ~6 ~25, 'host+%2B+path+%2B+query'
28 ADD_ARRAY_ELEMENT ~6 262144, 'path'
29 ADD_ARRAY_ELEMENT ~6 0, 'path+%2B+query'
30 ADD_ARRAY_ELEMENT ~6 524288, 'query'
53 31 ASSIGN !1, ~6
67 32 > FE_RESET_R $27 !0, ->55
33 > > FE_FETCH_R $27, !2, ->55
68 34 > > FE_RESET_R $28 !1, ->52
35 > > FE_FETCH_R ~29 $28, !3, ->52
36 > ASSIGN !4, ~29
69 37 ROPE_INIT 4 ~32 !2
38 ROPE_ADD 1 ~32 ~32, '+%3D%3E+'
39 ROPE_ADD 2 ~32 ~32, !4
40 ROPE_END 3 ~31 ~32, '+%3A%0D%0A'
41 ECHO ~31
70 42 INIT_FCALL 'var_dump'
43 INIT_FCALL 'filter_var'
44 SEND_VAR !2
45 SEND_VAL 273
46 SEND_VAR !3
47 DO_ICALL $34
48 BOOL ~35 $34
49 SEND_VAL ~35
50 DO_ICALL
68 51 > JMP ->35
52 > FE_FREE $28
72 53 ECHO '%0D%0A'
67 54 > JMP ->33
55 > FE_FREE $27
74 56 > RETURN 1
Generated using Vulcan Logic Dumper, using php 8.0.0
preferences:
148.06 ms | 1400 KiB | 17 Q