DirectoryIterator::isExecutable

Determine if current DirectoryIterator item is executable

&reftitle.description; public `bool` `DirectoryIterator::isExecutable`

Determines if the current `DirectoryIterator` item is executable.

&reftitle.parameters; &no.function.parameters;
&reftitle.returnvalues;

Returns &true; if the entry is executable, otherwise &false;

&reftitle.examples;

### `DirectoryIterator::isExecutable` example

This example lists files in the directory containing the script which are executable.

    <?php
    $iterator = new DirectoryIterator(dirname(__FILE__));
    foreach ($iterator as $fileinfo) {
        if ($fileinfo->isExecutable()) {
            echo $fileinfo->getFilename() . "\n";
        }
    }
    ?>

&example.outputs.similar;

    example.php
    myscript.sh

&reftitle.seealso;

- `DirectoryIterator::isReadable`
- `DirectoryIterator::isWritable`
- `DirectoryIterator::getPerms`