IT/php

php is_null — 변수가 NULL인지 확인합니다

조원태 2016. 12. 13. 15:33
반응형

is_null — 변수가 NULL인지 확인합니다


[설명]

bool is_null ( mixed $var )

주어진 변수가 NULL인지 확인합니다.


[인수]

var

평가할 변수.


[반환값]


var가 null이면 TRUE를, 아니라면 FALSE를 반환합니다.


Example #1 is_null() 예제


<?php


error_reporting(E_ALL);


$foo = NULL;

var_dump(is_null($inexistent), is_null($foo));


?>

Notice: Undefined variable: inexistent in ...

bool(true)

bool(true)

반응형