note 125622 deleted from language.variables.scope by crell
| From: | crell@php.net | Date: | Thu, 31 Mar 2022 19:35:18 +0000 |
| Subject: | note 125622 deleted from language.variables.scope by crell | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-217922@lists.php.net to get a copy of this message | ||
Note Submitter: jtunaley at gmail dot com
----
It's worth noting that block statements without a control structure also don't affect
variable scope.
<?php
{
$a = 4;
}
echo $a; // Outputs "4"