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/04/06 12:47]
jeff
uphp:functions:isset [2021/09/13 05:57] (current)
Line 7: Line 7:
 ====Description==== ====Description====
  
-<well size="sm"> +<well size="sm"><html>
-<html>+
 <span style="font-size:125%;color:green">int <span style="font-size:125%;color:green">int
-<span style="color:black"> +<span style="color:black">isset (
-</html> +
-[[isset]] ( +
-<html>+
 <span style="color:green">mixed <span style="color:green">mixed
 <span style="color:blue">$variable <span style="color:blue">$variable
 <span style="color:black">) <span style="color:black">)
-</html> +</html></well>
-</well>+
  
 Determine if a variable is set Determine if a variable is set
Line 26: 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====
  
-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
  
 ====Examples==== ====Examples====
Line 55: 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:
Line 90: Line 85:
 [[is_float()]] - Check if a variable is a <html><b><span style="color:green">float<span style="color:black"></b></html> [[is_float()]] - Check if a variable is a <html><b><span style="color:green">float<span style="color:black"></b></html>
  
-[[is_numeric()]] - Check if a value is numeric (<html><b><span style="color:green">int<span style="color:black"></b></html>, <html><b><span style="color:green">float<span style="color:black"></b></html> or numeric <html><b><span style="color:green">string<span style="color:black"></b></html>)+[[is_numeric()]] - <html>Check if a value is numeric (<b><span style="color:green">int<span style="color:black"></b>, <b><span style="color:green">float<span style="color:black"></b> or numeric <b><span style="color:green">string<span style="color:black"></b>)</html>
  
 [[is_array()]] - Check if a variable is an <html><b><span style="color:green">array<span style="color:black"></b></html> [[is_array()]] - Check if a variable is an <html><b><span style="color:green">array<span style="color:black"></b></html>
uphp/functions/isset.1491482827.txt.gz · Last modified: 2021/09/13 05:56 (external edit)