Hello,
Using dynamic class names works fine without namespaces, but
doesn't work at all with namespaces. Take this simple example:
<?php
namespace test;
class Foo {}
$class = "Foo";
$foo = new test::$class();
?>
Will produce the following message:
Fatal error: Class 'test::test' not found in foo.php on line Y
Now if Foo would have a static method and we want to use dynamic
access for a static method, we get another error:
<?php
include 'foo.php';
$class = "Foo";
test::$class::test();
?>
Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in ...
All tested with current 5.3
/Magnus
--
Small things make base men proud.
-- William Shakespeare, "Henry VI"
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php