multiple namespace per file patch

php.internals

Greg Beaver

18 years ago
Hi, There's been enough confusion, here's the patch again, this time against 5.3, no tests for clarity http://pear.php.net/~greg/multi.5.3.patch.txt This patch allows: <?php namespace A; class a {} namespace B; class a {} namespace A; import B::a as b; class c extends b; ?> It doesn't allow: <?php $anycode = 1; namespace A; ?> so all code must have a namespace declaration. The sole purpose is to combine files containing namespace declarations. Greg

Sam Barrow

18 years ago
I support this patch 100%. I have a large application I'm rewriting to include namespaces, however now I can no longer use my script caching functionality (which improved performance literally about 500%) that compiled all of my includes into one file, because many of the files have namespaces. On Tue, 2007-12-04 at 12:12 -0600, Gregory Beaver wrote: