note 109341 deleted from language.functions by googleguy
| From: | googleguy@php.net | Date: | Sat, 12 Jan 2013 11:06:36 +0000 |
| Subject: | note 109341 deleted from language.functions by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-192988@lists.php.net to get a copy of this message | ||
Note Submitter: Ankur Thakur
----
A Variable declared in Outer Function will not be visible in the Inner Function even if you access
it using global.
<?php
function outer_function()
{
$outer_var = 1;
function inner_function()
{
global $outer_var;
echo $outer_var; // Not Visible :(
}
}
?>