How can the code snippet be modified to display the size and creation date for each file in the directory?

To display the size and creation date for each file in the directory, we can modify the code snippet by using the `filesize()` function to get the size of each file and the `filectime()` function to get the creation date. We can then echo out this information for each file in the directory.

$dir = "/path/to/directory/";

$files = scandir($dir);

foreach($files as $file){
    if(is_file($dir.$file)){
        echo "File: $file | Size: " . filesize($dir.$file) . " bytes | Creation Date: " . date("Y-m-d H:i:s", filectime($dir.$file)) . "<br>";
    }
}