note 56753 deleted from language.variables.scope by sean
| From: | sean@php.net | Date: | Wed, 14 Sep 2005 12:43:46 +0000 |
| Subject: | note 56753 deleted from language.variables.scope by sean | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-95165@lists.php.net to get a copy of this message | ||
Note Submitter: erwinmoller at xs4all dot nl
Reason: useless
----
For those coming from a Java background, beware of the fact that PHP is not aware of variables made
into a block {...}.
PHP will just treat them as if they were declared out the block.
This confused me a little. :-)
example:
<?
if (1==1){
$name = "Zaphod";
}
echo $name;
?>
will just produce Zaphod.