Hannes Magnusson wrote:
On Tue, Dec 9, 2008 at 10:15, Jani Taskinen <[EMAIL PROTECTED]> wrote:
Johannes Schlüter wrote:
On Mon, 2008-12-08 at 12:36 +0000, "Jani Taskinen" wrote:
+// If __DIR__ is not defined, define it
+if (!defined('__DIR__')) {
defined() will always return true ...
Huh? Are you absolutely sure now? :) What would the use of defined() be if
it didn't do what it's supposed to do? :D

[EMAIL PROTECTED] ~]$ src/build/php_5_3/sapi/cli/php -d error_reporting=E_ALL
-r 'var_dump(defined("__DIR__"));'

Duh..I didn't realize it returned false ALWAYS.

defined() apparently doesn't work on magic constants (__LINE__,
__METHOD__, __FILE__...).
The docs don't mention this so I assume johannes found a bug he should report :)

Well, magical or not, they're still constants.


PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to