Jump to content
Larry Ullman's Book Forums

Recommended Posts

Page 211:  [Tip] PHP allows you to more quickly reference namespaces...use keyword:

 

Book says (incorrect):

 

use MyNameSpace\Company;

 

Should be (corrected):

 

use MyNameSpace\Company\Department;

use MyNameSpace\Company\Employee;

 

All class names used must be included at the end of the namespace.

  • Upvote 1
Link to comment
Share on other sites

  • 1 year later...

This is the only way I could get it to work. I tried it both ways. Maybe it's just my PHP v5.3?

 

Thanks JohnD, I ran into the same problem which I posted and then ran into this thread.

 

Your solution worked, I'm not sure what Antonio is referring to. I am using PHP 5.5.

Link to comment
Share on other sites

 Share

×
×
  • Create New...