#46304 [Ctl->Csd]: Defining namespaced constant using define() defines CASE SENSITIVE namespace

From: Date: Mon, 12 Jan 2009 21:55:05 +0000
Subject: #46304 [Ctl->Csd]: Defining namespaced constant using define() defines CASE SENSITIVE namespace
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-132812@lists.php.net to get a copy of this message
 ID:               46304
 Updated by:       stas@php.net
 Reported By:      kenashkov at gmail dot com
-Status:           Critical
+Status:           Closed
 Bug Type:         Scripting Engine problem
 Operating System: *
 PHP Version:      5.3CVS-2008-11-11
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Thanks for reporting it.


Previous Comments:
------------------------------------------------------------------------

[2008-11-11 10:37:05] jani@php.net

This better be fixed before PHP 5.3.0 goes out - hence critical..

------------------------------------------------------------------------

[2008-10-16 11:12:34] felipe@php.net

Oh, sorry. I misread your report. Thanks Greg.

------------------------------------------------------------------------

[2008-10-16 04:04:44] cellog@php.net

I think this is a valid bug - we store classes with lower-cased name,
but store the original CaSeD name in the class.  runtime define() should
perform the same steps that compile-time define() does to ensure the
namespaced constant is accessible in the same way.  It's a bit slower,
but more accurate.  I'd say move this back to scripting engine, but I'll
leave it up to felipe.

------------------------------------------------------------------------

[2008-10-15 16:08:05] kenashkov at gmail dot com

I know it is during runtime, but instead of marking it as bogus, would
be better to document it.
I'm changing the category.
This behaviour has to be documented, or fixed. Is it possible to remap
to lowercase internally the result of the
define('CaSe::Sensitive::const')? Or is undesirable from consistant POV?

------------------------------------------------------------------------

[2008-10-15 15:57:01] felipe@php.net

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php

The define() works in runtime.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/46304

-- 
Edit this bug report at http://bugs.php.net/?id=46304&edit=1



Thread (8 messages)

« previous php.bugs (#132812) next »