title: PHP - Case insensitive File Search
body: <p>I need to check the image folder for adding some product images. My product list array has SKUs such as <code>a48be25, A48be29, A48BE30</code> and my image folder has images such as <code>a48BE25_1.jpg, a48bE29_2.JPG, A48BE30_1.jpg</code> and so on. </p>
  
  <p>As you can see, the images and SKUs are mixed. I need to somehow match SKUs to the file names. If I use <code>glob("my/dir/{$SKU}*.jpg")</code>, it won't work in case sensitive operating systems according to the best of my knowledge. Is there a way to force <code>glob</code> to search in a case-insensitive way?</p>
  
  <p>EDIT: I don't think this thread is a duplicate of <a href="https://stackoverflow.com/questions/2520612/can-phps-glob-be-made-to-find-files-in-a-case-insensitive-manner">this one</a>. I am saying this because in my case I can have many SKUs that can have mixed cases. In the mentioned thread, OP only had the word <code>CSV</code> in mixed cases, so <code>glob('my/dir/*.[cC][sS][vV]')</code> could work well there.</p>