#27855 [NEW]: setting up a constant with a value retrieved by a function

From: Date: Sat, 03 Apr 2004 20:49:53 +0000
Subject: #27855 [NEW]: setting up a constant with a value retrieved by a function
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969359927@lists.php.net to get a copy of this message
From: blackei2k at gmx dot de Operating system: Linux PHP version: 4.3.5 PHP Bug Type: Documentation problem Bug description: setting up a constant with a value retrieved by a function Description: ------------ You can't define a constant using define(), and automatically assign a value to it, that is of a function. Reproduce code: --------------- <?php define("E_SQL", mysql_error(), true); ?> Expected result: ---------------- E_SQL should now contain the last error-string. (Of course only if there was an error). Actual result: -------------- It's empty -- Edit bug report at http://bugs.php.net/?id=27855&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27855&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27855&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27855&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27855&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27855&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27855&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27855&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27855&r=support Expected behavior: http://bugs.php.net/fix.php?id=27855&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27855&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27855&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27855&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27855&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27855&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27855&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27855&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27855&r=float

« previous php.doc (#969359927) next »