From the manual:
Description
int chmod(string filename, int mode);
...
Note: This function does not work on Windows systems
You're out of luck on Windows, it seems. Note that depending on the
underlying filesystem, the volume may not even have any concept
of user permissions.
OTOH, I suppose nothing is preventing you from calling
exec("attrib -r $myfile");
and
exec("attrib +r $myfile");
I'm not sure what this buys you--what kind of write-access from others
are you trying to guard against?