File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,10 @@ $path->match('/var/www/*/Con*'); // true
9696$path->match('file?.txt'); // matches file1.txt, fileA.txt, etc.
9797$path->match('file[123].txt'); // matches file1.txt, file2.txt, file3.txt
9898$path->match('test/*/*.php'); // matches test/any/file.php
99+
100+ // Case sensitivity depends on the operating system
101+ // Windows: case-insensitive (File.TXT matches *.txt)
102+ // Unix/Linux: case-sensitive (File.TXT does NOT match *.txt)
99103```
100104
101105## Edge cases and special handling
Original file line number Diff line number Diff line change @@ -209,7 +209,7 @@ public function absolute(): self
209209 public function match (string |self $ pattern ): bool
210210 {
211211 \is_string ($ pattern ) and $ pattern = self ::create ($ pattern );
212- return \fnmatch ((string ) $ pattern ->absolute (), $ this ->absolute ()->path , \FNM_NOESCAPE | \ FNM_CASEFOLD );
212+ return \fnmatch ((string ) $ pattern ->absolute (), $ this ->absolute ()->path , \FNM_NOESCAPE );
213213 }
214214
215215 /**
You can’t perform that action at this time.
0 commit comments