File: glob2pcre-test.php

package info (click to toggle)
phpwiki 1.3.14-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 15,716 kB
  • ctags: 23,548
  • sloc: php: 88,295; sql: 1,476; sh: 1,378; perl: 765; makefile: 602; awk: 28
file content (29 lines) | stat: -rwxr-xr-x 444 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php

error_reporting(~E_ALL);

// fix "lib/stdlib.php:1348: Warning[2]: Compilation failed: unmatched parentheses at offset 2"

include(dirname(__FILE__)."/../lib/stdlib.php");

foreach (array(
"test", 
"test*", 
"test*.mpg", 
"Calendar/test*.mpg", 
"Calendar/*", 
"test.mpg*", 
"test\*",
"test\.*",
"test.*",
"test$",
"*test",
"*test.mpg",
"te()st",
"tes(t]",
"tes<t>",
) as $s) {
    echo '"', $s, '" => "', glob_to_pcre($s), "\"\n";
}

?>