Core Function isVarRef
From Sputnik Wiki
(Difference between revisions)
(Created page with "<pre> isVarRef( $variable ) </pre> === Description === Check if a variable is an reference to another variable. === Parameters === ==== variable ==== The variable to check. ...") |
(→Example) |
||
(One intermediate revision by one user not shown) | |||
Line 15: | Line 15: | ||
=== Return Value === | === Return Value === | ||
− | Success: Returns | + | Success: Returns true. |
− | Failure: Returns | + | Failure: Returns false. |
=== Remarks === | === Remarks === | ||
Line 28: | Line 28: | ||
$var1 = "check me"; | $var1 = "check me"; | ||
println( "Is it?: " . isVarRef($var1) ); | println( "Is it?: " . isVarRef($var1) ); | ||
+ | |||
+ | $var2 = &$var1; | ||
+ | println( "Is it?: " . isVarRef($var2) ); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Core Function]] | [[Category:Core Function]] |
Latest revision as of 10:36, 29 August 2013
isVarRef( $variable )
Contents |
Description
Check if a variable is an reference to another variable.
Parameters
variable
The variable to check.
Return Value
Success: Returns true.
Failure: Returns false.
Remarks
None.
Example
$var1 = "check me"; println( "Is it?: " . isVarRef($var1) ); $var2 = &$var1; println( "Is it?: " . isVarRef($var2) );