Welcome Guest, Not a member yet? Register   Sign In
Checking a variable for existance without isset(), empty(), or any other function
#4

[eluser]John_Betong[/eluser]
 

Your question certtainly is food for thought

From my limited experience I endeavour to write code without any errors because
the application seems to be much more nippier if there are no errors.

Using isset(...) I think is a KLUDGE because one is relying on PHP to trot off and
search to see if the variable has been set is in the boolean, numeric, string, array, etc
list of variables. After eliminating all possible options isset(...) will return your query.
This must take processing time.

I would be tempted to ensure your $potential_element has a default value and
therefore eliminate the search. Is it possible set a default value and run tests
with and without the default variable?
 
 
 
edit: spelling.


Messages In This Thread
Checking a variable for existance without isset(), empty(), or any other function - by El Forum - 11-23-2009, 11:37 PM



Theme © iAndrew 2016 - Forum software by © MyBB