(PHP >= 5.3.0, PECL phar >= 1.2.0)
Phar::hasMetaData — Returns whether phar has global meta-data
Returns whether phar has global meta-data set.
No parameters.
Returns TRUE if meta-data has been set, and FALSE if not.
Пример #1 A Phar::hasMetaData() example
<?php
try {
$phar = new Phar('myphar.phar');
var_dump($phar->hasMetadata());
$phar->setMetadata(array('thing' => 'hi'));
var_dump($phar->hasMetadata());
$phar->delMetadata();
var_dump($phar->hasMetadata());
} catch (Exception $e) {
// handle error
}
?>
Результат выполнения данного примера:
bool(false) bool(true) bool(false)