Phar::getVersion
Phar::interceptFileFuncs
Phar
PHP Manual

# Phar::hasMetaData

(PHP >= 5.3.0, PECL phar >= 1.2.0)

Phar::hasMetaData — Returns whether phar has global meta-data

### 설명

bool Phar::hasMetadata ( void )

Returns whether phar has global meta-data set.

### 인수

No parameters.

### 반환값

Returns `TRUE` if meta-data has been set, and `FALSE` if not.

### 예제

Example #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)

### 참고

- Phar::getMetadata() - Returns phar archive meta-data
- Phar::setMetadata() - Sets phar archive meta-data
- Phar::delMetadata() - Deletes the global metadata of the phar

Phar::getVersion
Phar::interceptFileFuncs
Phar
PHP Manual