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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...