PHP 8.4 Engine Dashboard

Status: Active & Operational

Synology DiskStation DS923+ Web Station 환경에 세팅된 PHP 8.4 런타임 샘플 페이지입니다. 차세대 Property Hooks, Asymmetric Visibility, 신규 배열 내장 함수군 등 최신 PHP 8.4 기능들이 정상 동작하는지 실시간으로 검증하고 성능을 측정합니다.

PHP Version
8.4 (v8.4.19)
Server SAPI / Software
fpm-fcgi nginx/1.23.1
Loaded Extensions
64 개 모듈
Memory Usage (Peak)
2 MB (한도: 128M)
Execution / Render
0.47 ms

🚀 PHP 8.4 신기능 라이브 쇼케이스

현재 웹서버 PHP 8.4 엔진에서 직접 컴파일 및 실행된 실제 연산 결과입니다.

6개 핵심 기능 검증
RFC: Property Hooks ✓ 실행 완료

Property Hooks (프로퍼티 훅)

보일러플레이트 게터/세터 메서드 없이 클래스 프로퍼티에 get/set 로직을 직접 선언할 수 있습니다.

class CoffeeOrder {
    public int $cups = 1 {
        set {
            if ($value < 1) throw new InvalidArgumentException("최소 1잔 이상 주문해야 합니다.");
            $this->cups = $value;
        }
    }
    public int $pricePerCup = 3500;
    public int $totalPrice {
        get => $this->cups * $this->pricePerCup;
    }
}

$order = new CoffeeOrder();
$order->cups = 3;
return "주문 잔수: {$order->cups}잔, 총 결제 금액: " . number_format($order->totalPrice) . "원 (Property Hooks 정상 작동)";
🎯
실행 결과: 주문 잔수: 3잔, 총 결제 금액: 10,500원 (Property Hooks 정상 작동)
RFC: Asymmetric Visibility ✓ 실행 완료

Asymmetric Visibility (비대칭 프로퍼티 가시성)

프로퍼티의 읽기(public)와 쓰기(private/protected) 권한을 독립적으로 지정할 수 있습니다.

class ZiggsServerStatus {
    public private(set) string $nodeName = "DS923-ZiggsCafe";
    public private(set) int $activeVisitors = 128;
    
    public function addVisitor(): void {
        $this->activeVisitors++;
    }
}

$server = new ZiggsServerStatus();
$server->addVisitor();
return "노드: {$server->nodeName} (외부 읽기 가능), 현재 접속자: {$server->activeVisitors}명 (외부 쓰기는 차단됨)";
🎯
실행 결과: 노드: DS923-ZiggsCafe (외부 읽기 가능), 현재 접속자: 129명 (외부 쓰기는 차단됨)
RFC: array_find, array_find_key, array_any, array_all ✓ 실행 완료

새로운 배열 함수군 (array_find, array_any, array_all)

루프 없이 콜백 조건을 만족하는 배열 요소를 신속하게 검색하고 검증하는 내장 함수입니다.

$menu = [
    ['name' => '에스프레소', 'temp' => 'hot', 'price' => 3000],
    ['name' => '아이스 아메리카노', 'temp' => 'ice', 'price' => 3500],
    ['name' => '바닐라 라떼', 'temp' => 'ice', 'price' => 4500],
    ['name' => '카모마일 티', 'temp' => 'hot', 'price' => 4000],
];

if (function_exists('array_find')) {
    $firstIce = array_find($menu, fn($item) => $item['temp'] === 'ice');
    $allAffordable = array_all($menu, fn($item) => $item['price'] <= 5000);
    $hasExpensive = array_any($menu, fn($item) => $item['price'] >= 4500);
    
    return sprintf(
        "첫 번째 아이스 메뉴: [%s (%d원)], 전 메뉴 5,000원 이하 여부: %s, 4,500원 이상 메뉴 존재: %s",
        $firstIce['name'],
        $firstIce['price'],
        $allAffordable ? '예' : '아니오',
        $hasExpensive ? '예' : '아니오'
    );
} else {
    return "array_find() 계열 함수가 아직 활성화되지 않았습니다.";
}
🎯
실행 결과: 첫 번째 아이스 메뉴: [아이스 아메리카노 (3500원)], 전 메뉴 5,000원 이하 여부: 예, 4,500원 이상 메뉴 존재: 예
RFC: new MyClass()->method() without parentheses ✓ 실행 완료

new 인스턴스화 괄호 없는 메서드 체이닝

new 클래스()를 괄호로 묶지 않고도 즉시 메서드나 프로퍼티를 체이닝하여 호출할 수 있습니다.

class CoffeeRoaster {
    public function getBlend(): string {
        return "에티오피아 예가체프 G1 (Aroma: Floral, Berry, Citrus)";
    }
}

// PHP 8.4에서는 (new CoffeeRoaster())->getBlend() 대신 괄호 없이 직접 체이닝 가능
$blend = new CoffeeRoaster()->getBlend();
return "로스팅 블렌드 결과: " . $blend;
🎯
실행 결과: 로스팅 블렌드 결과: 에티오피아 예가체프 G1 (Aroma: Floral, Berry, Citrus)
RFC: Deprecated Attribute ✓ 실행 완료

#[\Deprecated] 공식 표준 어트리뷰트

PHP 표준 어트리뷰트로 폐기 예정인 함수나 메서드를 명시하고 리플렉션으로 감지할 수 있습니다.

class CafeLegacy {
    #[\Deprecated(message: "새로운 makeDripCoffee() 메서드를 사용하세요.", since: "8.4")]
    public function oldBrew(): string {
        return "구형 드립 추출 완료";
    }
}

$ref = new ReflectionMethod('CafeLegacy', 'oldBrew');
$attrs = $ref->getAttributes(Deprecated::class);
$depInfo = !empty($attrs) ? $attrs[0]->newInstance() : null;

return $depInfo 
    ? sprintf("#[\Deprecated] 어트리뷰트 감지됨! 메시지: '%s' (Since: %s)", $depInfo->message, $depInfo->since)
    : "Deprecated 어트리뷰트 클래스 없음";
🎯
실행 결과: #[\Deprecated] 어트리뷰트 감지됨! 메시지: '새로운 makeDripCoffee() 메서드를 사용하세요.' (Since: 8.4)
RFC: Dom HTML5 Parser ✓ 실행 완료

HTML5 지원 DOM 파서 (\Dom\HTMLDocument)

완전한 HTML5 표준 규격을 준수하는 고성능 DOM 파서가 네이티브로 탑재되었습니다.

if (class_exists('Dom\HTMLDocument')) {
    $doc = \Dom\HTMLDocument::createFromString('<div id="cafe"><p>Ziggs Cafe</p><span>☕</span></div>');
    $p = $doc->querySelector('#cafe p');
    return "Dom\\HTMLDocument HTML5 파서 파싱 성공! 노드 텍스트: " . ($p ? $p->textContent : 'N/A');
} else {
    return "Dom\\HTMLDocument 클래스 미지원 (ext-dom HTML5 사양 확인 필요)";
}
🎯
실행 결과: Dom\HTMLDocument HTML5 파서 파싱 성공! 노드 텍스트: Ziggs Cafe

⚡ 실시간 연산 벤치마크 (DS923+ Ryzen R1600)

20,000 이하 소수 탐색, SHA-256 15,000회 다중 해싱, 10,000개 배열 맵/필터링을 즉시 측정합니다.

Execution Time
-- ms
서버 실시간 연산 속도
Peak Memory Delta
-- MB
피크 메모리 점유량
Primes Computed
--
발견된 소수 개수
Hash Fingerprint
--
SHA-256 검증 다이제스트

📦 설치된 확장 모듈 (64개)

apcu
bcmath
bz2
calendar
cgi-fcgi
Core
ctype
curl ★
date
dba
dom ★
exif
fileinfo ★
filter
ftp
gd ★
gettext
gmp
hash
iconv
imagick
intl ★
json ★
ldap
libxml
mailparse
mbstring ★
memcached
mysqli ★
mysqlnd
openssl ★
pcntl
pcre
PDO ★
pdo_dblib
pdo_mysql ★
pdo_pgsql
pdo_sqlite
pgsql
Phar
posix
random
readline
Reflection
session ★
shmop
SimpleXML
soap
sockets
sodium ★
SPL
sqlite3
ssh2
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml ★
xmlreader
xmlwriter
Zend OPcache ★
zip ★
zlib

⚙️ 핵심 php.ini 설정

지시어 (Directive) 현재 설정값
memory_limit 128M
max_execution_time 240s
upload_max_filesize 32M
post_max_size 32M
display_errors Off
opcache.enable Enabled
opcache.jit disable
opcache.jit_buffer_size 64M
date.timezone Asia/Seoul
short_open_tag On
OS / Kernel Linux 4.4.302+ (x86_64)
Server Time 2026-10-20 09:54:42 KST