is_writeable()
is_writeable() — Alias of is_writable().
Built-in function of PHP 8.5. The manual lists it as available in PHP 4, PHP 5, PHP 7, PHP 8. This page is the reference card: signature, parameters and return value, plus the changelog and the example the manual provides.
is_writeable() is an alias of is_writable(): same parameters, same return value.
Signature
is_writeable(string $filename): bool
Parameters
| Parameter | Type | What it takes |
|---|---|---|
| $filename | string | The filename being checked. |
Return value
Returns true if the filename exists and is writable.
Example
A runnable snippet:
$filename = 'test.txt'; if (is_writable($filename)) { echo 'The file is writable'; } else { echo 'The file is not writable'; }
All PHP 8.5 built-in functions
Reference card built from the PHP manual page is_writeable() (PHP documentation, CC BY 3.0). The page is generated from the manual, so the wording of the parameter and return value text follows php.net.