If tutorials available on this website are helpful for you, please whitelist this website in your ad blocker😭 or Donate to help us ❤️ pay for the web hosting to keep the website running.
is_null() method check करता है , कि कोई variable null है या नहीं। यह Boolean value true / false ही return करता है।
is_null( mixed $value );
mixed $value | required : value जिसे आपको check करना है। चूंकि यह function सिर्फ check करता है इसलिए आप किसी भी type की value pass कर सकते हैं।
mixed type का मतलब होता है , कि आप अपनी need के according किसी भी type (String , Boolean , Array , Class , Numeric) की value pass कर सकते हैं। यह जरूरी नहीं है कि कोई special type की value ही pass करें।
Return Value : अगर value null है , तो true return होता है और बाकी conditions में false return होता है।
File : php_is_null.php
<?php
$a = null;
echo is_null($a) ? '$a is null' : '$a is null';
/*Another example*/
echo "<br>";
$b;
echo is_null($b) ? '$b is null' : '$b is not null';
echo "<br>";
$c = ' ';
echo is_null($c) ? '$c is null' : '$c is not null';
?>
$a is null $b is null $c is not null
Hi ! My name is Rahul Kumar Rajput. I'm a back end web developer and founder of learnhindituts.com. I live in Uttar Pradesh (UP), India and I love to talk about programming as well as writing technical tutorials and tips that can help to others.
Get connected with me. :) LinkedIn Twitter Instagram Facebook