ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Scripts  >>  PHP
 
 


 

 
 PHP interview questions  PHP Interview Questions
 ASP interview questions  ASP Interview Questions
 CGI Perl interview questions  CGI Perl Interview Questions
 JavaScript interview questions  JavaScript Interview Questions
 VB Script interview questions  VB Script Interview Questions
 JSP interview questions  JSP Interview Questions
 Shell Script interview questions  Shell Script Interview Questions
 Python interview questions  Python Interview Questions
 Tcl interview questions  Tcl Interview Questions
 Awk interview questions  Awk Interview Questions
 AJAX interview questions  AJAX Interview Questions
 Ruby on Rails interview questions  Ruby on Rails Interview Questions
 Scripts AllOther interview questions  Scripts AllOther Interview Questions
Question
How to differentiate isset and empty
 Question Submitted By :: Rakesh Kumar Nautiyal
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How to differentiate isset and empty
Answer
# 1
isset -> this variable handling functions determine whether 
a variable is set . It checks whether a variable is set 
even though it is empty.

empty -> as the term itself has already given a sign that 
it would related to something that's empty, this variable 
handling functions determine whether a variable is empty. 
It checks whether a variable has a value whether it's empty 
string, zero(0), or not set at all.
 
Is This Answer Correct ?    21 Yes 1 No
P .g .senthilkumar
 
  Re: How to differentiate isset and empty
Answer
# 2
isset is used for checking whether variable is set or not 
and empty checks whether it is empty
 
Is This Answer Correct ?    12 Yes 4 No
Rahul Shelar
 
 
 
  Re: How to differentiate isset and empty
Answer
# 3
actually, !isset and empty are one and same thing...
 
Is This Answer Correct ?    1 Yes 15 No
Rafique
 
  Re: How to differentiate isset and empty
Answer
# 4
isset() will ONLY return true when the value of the variable
is not NULL (and thereby the variable is at least defined).

empty() will return true when the value of the variable is
deemed to be an "empty" value, typically this means 0, "0",
NULL, FALSE and empty string, anything else is not empty.

Some examples


FALSE == isset($foo);
TRUE == empty($foo);
$foo = NULL;
FALSE == isset($foo);
TRUE == empty($foo);
$foo = 0;
TRUE == isset($foo);
TRUE == empty($foo);
$foo = 1;
TRUE == isset($foo);
FALSE == empty($foo);
 
Is This Answer Correct ?    12 Yes 1 No
Amit
 
  Re: How to differentiate isset and empty
Answer
# 5
isset is used to check whether the variable is set or 
not ...
where as empty is used to check whether variable contains a 
value or not
 
Is This Answer Correct ?    6 Yes 1 No
Vijay
 

 
 
 
Other PHP Interview Questions
 
  Question Asked @ Answers
 
write code to find the date difference b/w two given date using PHP not MYSQL function? HyperQuality2
What are the different ways to login to a remote server? Explain the means, advantages and disadvantages?  1
Suppose a variable may passed to other page using any of get,post,session,cookie methods and u want to retrive that variable value . what is the syntax?  6
Create a PHP web script with the following attributes: on start, three HTML form elements are shown: an string input field, a checkbox field, a dropdown/pull down list with 5 elements and a submit button. On submission, the form should be redisplayed (while remaining all options/inputs as the user has selected/entered them). Additionally, the selections/inputs of the user should be displayed in text. Please solve this without the use of any external libraries. Wipro1
What are the different methods of passing data or information between two calls of a web page? What are the advantages/disadvantages of these methods? Patni2
Here in this site i could not find the details for php ZEND certifications or i think u did not post any ? so i need the information about the php certification how to prepare and some of the mock exams?  1
In PHP how many size data can upload by default? PG-Software9
How do you get the Browser information? Life-Infotech2
how to include a datepicker in a form using php and mysql  2
When you will get the error "Cannot add header information"?  2
What is MIME?  2
How can you get, the total size of a certain directory?  1
What are the reasons for selecting lamp (linux, apache, mysql, PHP) instead of combination of other software programmes, servers and operating systems?  2
Questions on OOP concepts 1. What are the access specifiers available in php ? Explain 2. What is object cloning ? 3. What are the differences between interface and abstract class ? 4. What is overloading ? 5. What is overriding ? 6. How to prevent function overriding ? 7. What is the use of "final" keyword ? 8. What is static variable ? How will access a static variable ? What is static class ? NIIT2
How can we take a backup of a mysql table and how can we restore it. ? Brain-Infosys5
What is the scope of career in PHP/Mysql Verizon24
Is it possible to connect to a Microsoft Access database without a DSN? If so, how??  1
what is the maximum size of databasi in mysql?  4
How can I reset an array in PHP? Rushmore-Consultancy4
Functions in IMAP, POP3 AND LDAP? Rushmore-Consultancy1
 
For more PHP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com