On Thu, Feb 26, 2009 at 8:48 PM, Guilherme Blanco
<[email protected]> wrote:
> I doubt you'll find a patch to it.
>
> Mainly, the patch will be against this principle:
>
<snip>
Hmm, that wouldn't actually have an impact, as (at least, what I'm
aiming for/wanting to do) is not to introduce periods as valid in
actual class names, but to allow them to be used for autoloading - so
I can have something like this (abbreviated terribly, apologies):
function __autoload($sFoo)
{
include(str_replace(".", "/", $sFoo));
}
.. so, your example would expand to Foo.Bar, which given that periods
aren't allowed in a class name doesn't exist as a class, and won't
work. Unless I'm missing something?
Actually, I don't believe that expanding is even done - i.e. it
doesn't respect defines there
Seems that way on testing, too:
class FooBar
{
// ...
}
define('Part', 'Foo');
define('SubPart', 'Bar');
$fb = new Part.SubPart();
gives: Fatal error: Class 'Part' not found
.. but that part of things is a going off on a bit of a tangent.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php