1--TEST-- 2clearstatcache() optional parameters 3--SKIPIF-- 4<?php 5if (strncmp(PHP_OS, "WIN", 3) === 0) { 6 die('skip not for Windows'); 7} 8?> 9--FILE-- 10<?php 11 12@rmdir(__FILE__ . "_dir1"); 13@rmdir(__FILE__ . "_dir2"); 14@unlink(__FILE__ . "_link1"); 15@unlink(__FILE__ . "_link2"); 16 17mkdir(__FILE__ . "_dir1"); 18mkdir(__FILE__ . "_dir2"); 19symlink(__FILE__ . "_link1", __FILE__ . "_link2"); 20symlink(__FILE__ . "_dir1", __FILE__ . "_link1"); 21 22var_dump(realpath(__FILE__ . "_link2")); 23passthru("rm -f " . escapeshellarg(__FILE__ . "_link1")); 24var_dump(realpath(__FILE__ . "_link2")); 25clearstatcache(false); 26var_dump(realpath(__FILE__ . "_link2")); 27clearstatcache(true, "/foo/bar"); 28var_dump(realpath(__FILE__ . "_link2")); 29clearstatcache(true, __FILE__ . "_link2"); 30clearstatcache(true, __FILE__ . "_link1"); 31var_dump(realpath(__FILE__ . "_link2")); 32 33@rmdir(__FILE__ . "_dir1"); 34@rmdir(__FILE__ . "_dir2"); 35@unlink(__FILE__ . "_link1"); 36@unlink(__FILE__ . "_link2"); 37?> 38--EXPECTF-- 39string(%d) "%s_dir1" 40string(%d) "%s_dir1" 41string(%d) "%s_dir1" 42string(%d) "%s_dir1" 43bool(false) 44