# PHP5 namespace question

- Thread: https://externals.io/message/2319
- Original archive: https://news-web.php.net/php.internals/2319
- Started by walt boring on 2003-06-13T22:29:17+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #2319 — walt boring — 2003-06-13T22:29:17+00:00

URL: https://externals.io/message/2319#2319

Howdy,
  I was curious if it is possible to have an include work inside of a 
namespace for php5, and have classes/functions/defines
that are declared in the included file become part of the namespace?  
This is usefull for large library projects, where it would
be combersome for obvious reasons to have all classes/functions/defines 
to exist in the same file, just to make it part of the
namespace.


namespace mylib {
  include_once("my_foo_classes.php");
  include_once("my_bar_classes.php");
  include_once("my_blah_classes.php");
  include_once("my_foo_functions.php");
}

Walt

---

## #2320 — Daniel T. Gorski — 2003-06-13T22:32:26+00:00

URL: https://externals.io/message/2319#2320 · In reply to: #2319

>  I was curious if it is possible to have an include work inside of a 
> namespace for php5

PHP5 does not provide namespaces (anymore).

regards dtg
