> > It is possible to use the same namespace in several PHP files. > > Does this mean that a project like Phorum could declare the same > namespace at the top of all of our files and all the code in > those files > would exist in the same namespace?
Exactly. > common.php: > <?php > namespace Phorum; > > $PHORUM = get_settings(); > > function phorum_build_url(){ > return $url; > } > ?> > > list.php: > <?php > namespace Phorum; > > $url - phorum_build_url(); > > ?> > > > Or, would list.php have to import the Phorum namespace? > > Also, I don't see any mention of variables in namespaces. > Will there be > no effect on variables? Nor variables naither constants. They are defined in run-time. Dmitry. > > -- > > Brian Moon > Senior Developer > ------------------------------ > http://dealnews.com/ > It's good to be cheap =) > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php