User Tools

Site Tools


uphp:functions:isset

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
uphp:functions:isset [2017/05/09 10:08]
jeff
uphp:functions:isset [2021/09/13 05:57] (current)
Line 21: Line 21:
 <html><b><span style="color:blue">$variable<span style="color:black"></b></html>:  Variable to check for existence((Multiple parameters are not supported as in mainline PHP)) <html><b><span style="color:blue">$variable<span style="color:black"></b></html>:  Variable to check for existence((Multiple parameters are not supported as in mainline PHP))
  
-====Return Value====+====Return Values====
  
 <html><b><span style="color:green">Integer<span style="color:black"></b></html>:  1 (true) if variable exists, 0 (false) if variable does not exist <html><b><span style="color:green">Integer<span style="color:black"></b></html>:  1 (true) if variable exists, 0 (false) if variable does not exist
Line 50: Line 50:
 ====Notes==== ====Notes====
  
-There is no way to unset a variable once it has been set (except to exit the local scope or script where it was defined). Unlike mainline PHP, uPHP does not have a construct ''unset()'' or the constant ''null''. Unlike many other programming languages, you cannot simply remove a variable by setting it equal to nothing, such as by trying the statement ''$x=;''((As tested on a Wattmon Pro with firmware 1.1051 the statement ''$x=;'' causes a Watchdog Timeout error and a reboot of the Wattmon)).+There is no way to unset a variable once it has been set (except to exit the local scope or script where it was defined). Unlike mainline PHP, uPHP does not have a construct ''unset()'' or the constant ''null''. Unlike many other programming languages, you cannot simply remove a variable by setting it equal to nothing, such as by trying the statement ''$x=;''((As tested on a [[hardware:wattmons:WattmonPRO]] with firmware 1.1051 the statement ''$x=;'' causes a Watchdog Timeout error and a reboot of the Wattmon)).
  
 Also note that the uPHP [[isset()]] does not always generate a parsing error if the parameter is not a variable((See http://php.net/manual/en/function.isset.php where it says "Warning: isset() only works with variables as passing anything else will result in a parse error.")). All of these examples will return 0: Also note that the uPHP [[isset()]] does not always generate a parsing error if the parameter is not a variable((See http://php.net/manual/en/function.isset.php where it says "Warning: isset() only works with variables as passing anything else will result in a parse error.")). All of these examples will return 0:
uphp/functions/isset.1494324520.txt.gz · Last modified: 2021/09/13 05:56 (external edit)