Deleting all files of a directory over a given file size each
<p>I have a bit of script that deletes all .png files in a directory:</p>

<pre><code>foreach (glob("*.png") as $filename) {
    echo "$filename size " . filesize($filename) . "\n";
    unlink($filename);
}
</code></pre>

<p>How do I take this one step further to delete all <code>.png</code> files over a certain file size?</p>

<p>I have another bit of script that finds out the file size of all the files in the directory:</p>

<pre><code>$bytes = filesize('example.png');
</code></pre>

<p>How do I combine the two?</p>
