SplFileInfo::isExecutable
(PHP 5 >= 5.1.2)
SplFileInfo::isExecutable — Tells if the file is executable
Beschreibung
public bool SplFileInfo::isExecutable
( void
)
Checks if the file is executable.
Parameter-Liste
Diese Funktion hat keine Parameter.
Rückgabewerte
Returns TRUE if executable, FALSE otherwise.
Beispiele
Beispiel #1 SplFileInfo::isExecutable() example
<?php
$info = new SplFileInfo('/usr/bin/php');
var_dump($info->isExecutable());
$info = new SplFileInfo('/usr/bin');
var_dump($info->isExecutable());
$info = new SplFileInfo('foo');
var_dump($info->isExecutable());
?>
Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:
bool(true) bool(true) bool(false)