note 104216 modified in language.types.null by danbrown

From: Date: Fri, 03 Jun 2011 16:15:00 +0000
Subject: note 104216 modified in language.types.null by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-180230@lists.php.net to get a copy of this message
This simple shorthand seems to work for setting new variables to NULL: <?php $Var; ?> The above code will set $Var to NULL UPDATE: After further testing it appears the code only works in the global scope and does not work inside functions. <?php function Example(){ $Var; var_dump($Var); } ?> Would not work as expected. --was-- This simple shorthand seems to work for setting new variables to NULL: <?php $Var; ?> The above code will set $Var to NULL http://php.net/manual/en/language.types.null.php

« previous php.notes (#180230) next »