-
-
Save adam-vessey/386494830670a19e0f97 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$dir = '/tmp'; | |
$file = "$dir/alpha"; | |
file_put_contents($file, 'test'); | |
$stat_one = stat($file); | |
file_put_contents($file, 'test_string'); | |
$stat_two = stat($file); | |
clearstatcache(TRUE, $file); | |
$stat_three = stat($file); | |
print('Should contain "size", however:'); | |
print_r(array_diff_assoc($stat_one, $stat_two)); | |
print('After clearing the stat cache:'); | |
print_r(array_diff_assoc($stat_one, $stat_three)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment