*The Problem (as defined by Greg):*

foo.php:
<?php
namespace one::step;
function two(){}

namespace one;
class step {
static function two(){}
}
?>

main.php:
<?php
include 'foo.php';
// is this class one::step or namespace one::step?
one::step::two();
?>


*A Simpler Solution*
Force userland / general naming conventions in PHP.

# namespaces are always lowercase
# functions are always lowercase
# classes are always CamelCaps with initial uppercase letter enforced

thus:
//this is always the function two in namespace one::step
one::step::two();
//this is always the method two of class step in namespace one
one::Step::two();

thoughts, opinions, reasons why it wouldn't work?

regards,

nathan

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to