Using dot in php namespace

Any cons to using a dot in php namespaces?
SAbboushiAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
You can try it but this page http://php.net/manual/en/language.variables.basics.php says that it is not acceptable in variable names.  I suspect the same rules apply to 'namespaces' since they are user names.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ray PaseurCommented:
You have a lot of reading to do!  Start here and follow the links:
http://php.net/manual/en/language.namespaces.php

A dot in a namespace declaration will cause a PHP parse error.  Fortunately this cannot cause a run-time error unless your script is trying something really weird like a dynamically generated namespace.

FWIW, if you're not using namespaces in your scripts yet, drop everything and go refactor.  You can thank me later!
SAbboushiAuthor Commented:
Thanks Ray - I already read that.  The only reference I saw was a user post saying [don't use dot in namespace] but no explanation why.  Did I miss something?

I didn't have a chance to try yet, but your experience with Dave's certainly is enough to dissuade me!  Thanks-
Ray PaseurCommented:
It's a parse error -- you don't even have to try ;-)  PHP won't let you try!

Thanks for the points and thanks for using E-E, ~Ray
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.