File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #69628: GLOB_BRACE with multiple brackets within the braces fails
3
+ --FILE--
4
+ <?php
5
+
6
+ $ file_path = dirname (__FILE__ );
7
+
8
+ // temp dirname used here
9
+ $ dirname = "$ file_path/bug69628 " ;
10
+
11
+ // temp dir created
12
+ mkdir ($ dirname );
13
+
14
+ // temp files created
15
+ file_put_contents ("$ dirname/image.jPg " , '' );
16
+ file_put_contents ("$ dirname/image.gIf " , '' );
17
+ file_put_contents ("$ dirname/image.png " , '' );
18
+
19
+ sort_var_dump (glob ("$ dirname/*.{[jJ][pP][gG],[gG][iI][fF]} " , GLOB_BRACE ));
20
+
21
+ function sort_var_dump ($ results ) {
22
+ sort ($ results );
23
+ var_dump ($ results );
24
+ }
25
+
26
+ ?>
27
+ --CLEAN--
28
+ <?php
29
+
30
+ $ file_path = dirname (__FILE__ );
31
+ unlink ("$ file_path/bug69628/image.jPg " );
32
+ unlink ("$ file_path/bug69628/image.gIf " );
33
+ unlink ("$ file_path/bug69628/image.png " );
34
+ rmdir ("$ file_path/bug69628/ " );
35
+
36
+ ?>
37
+ --EXPECTF--
38
+ array(2) {
39
+ [0]=>
40
+ string(%d) "%s/bug69628/image.gIf"
41
+ [1]=>
42
+ string(%d) "%s/bug69628/image.jPg"
43
+ }
You can’t perform that action at this time.
0 commit comments