Null coalescing operator ?? > PHP프레임워크

PHP프레임워크

Null coalescing operator ?? 정보

기타 Null coalescing operator ??

본문

PHP7 에서 부터 가능하다고 합니다.

 

$pageTitle = $suppliedTitle ?? 'Default Title';

 

// Equivalent to:

$pageTitle = isset($suppliedTitle) ? $suppliedTitle : 'Default Title';

추천
0
  • 복사

댓글 0개

© SIRSOFT
현재 페이지 제일 처음으로