From: [EMAIL PROTECTED]
Operating system: Windows XP
PHP version: 4.2.0
PHP Bug Type: Variables related
Bug description: defined() does not work properly within function or class
The function defined() always return false within a function or class,
although the value of the constant is still available.
the code :
<?php
define(NAME, "value");
function f() {
if (defined(NOM)) echo "NOM is defined";
echo NOM;
}
f();
?>
will print "value" only. Currently tested with EasyPHP running with a
Windows XP computer.
--
Edit bug report at http://bugs.php.net/?id=20406&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=20406&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=20406&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=20406&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=20406&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=20406&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=20406&r=support
Expected behavior: http://bugs.php.net/fix.php?id=20406&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=20406&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=20406&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=20406&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20406&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=20406&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=20406&r=isapi