[PHP4BETA] Undocumented behavior of PHP 3.0
| From: | Zeev Suraski | Date: | Fri, 14 May 1999 19:54:50 +0000 |
| Subject: | [PHP4BETA] Undocumented behavior of PHP 3.0 | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-861@lists.php.net to get a copy of this message | ||
An undocumented behavior of PHP 3.0 was the fact that functions could be
declared inside control structures, such as if statements or other
functions.
For example:
function declare_foo()
{
function foo()
{
code
}
}
could be used so that you could declare foo() selectively. This
behavior was never documented, and pretty much goes against compilation.
My question is, especially for the PHPlib guys - were you aware of this
behavior, and did you take advantage of it? If it was something many
people relied on, it might be worth it to consider implementing it in
Zend, even though it's not that easy (to say the least).
Zeev
--
-----------------------------------------------------
Zeev Suraski <zeev@zend.com>
For a PGP public key, finger bourbon@netvision.net.il
--
PHP 4 Beta