ignore differences in the twelfth element of the stat() array.
2. The 'test.file' is created by the script, thus the owner of the file
is the user id executing the script. A mode of 0654 does not grant
the owner the right to execute the file and therefore, the correct
output here is "not executable."
$ls = lstat ('test.link');
for ($i = 0; $i <= 11; $i++) {
if ($ls[$i] != $s[$i]) {
- if($i!=6) echo "test.link lstat and stat differ at element $i\n";
+ if ($i != 6 && $i != 11) echo "test.link lstat and stat differ at element $i\n";
}
}
echo "test.file is " . filetype('test.file') . "\n";
test.file size is 0
test.file is writeable
test.file is readable
-test.file is executable
+test.file is not executable
test.file is not executable
test.file is a regular file
test.link is a regular file