Are there any performance considerations to keep in mind when using file names with extensions as keys in PHP arrays?

Using file names with extensions as keys in PHP arrays can lead to potential performance issues due to the additional processing required to handle string comparisons with file extensions. To mitigate this, it is recommended to store the file names without extensions as keys in the array and include the extensions as part of the array values.

// Example of storing file names without extensions as keys in an array
$files = [
    'file1' => 'file1.txt',
    'file2' => 'file2.jpg',
    'file3' => 'file3.pdf'
];