Are there standard guidelines for filenames in PHP to avoid problems with browsers and operating systems?

Filenames in PHP should adhere to certain guidelines to avoid problems with browsers and operating systems. It is recommended to use lowercase letters, numbers, underscores, and hyphens in filenames to ensure compatibility across different platforms. Avoid using special characters, spaces, and symbols that may cause issues.

$filename = "my_file_name.jpg";
$filename = strtolower(preg_replace('/[^a-z0-9._-]/', '', $filename));