How can error_reporting settings affect the visibility of warnings related to filemtime() in PHP?

When error_reporting settings are configured to suppress warnings, any warnings related to filemtime() will not be displayed. To ensure these warnings are visible, error_reporting should be set to include E_WARNING level errors. This can be achieved by using the error_reporting function in PHP.

// Set error reporting to display warnings
error_reporting(E_ALL & ~E_NOTICE);

// Your PHP code here
$file = 'example.txt';

// Get the last modified time of the file
$lastModified = filemtime($file);