3

Ok so I got namespace N.

And namespaces N\a and N\b.

I would like N\a\foo() to call N\b\bar().

But no matter what I do it says \N\b\bar() does not exist. What am I doing wrong??

I've tried including, using, requiring but nothing.

Comments
  • 2
    Ever tried composer autoloading? Also: are the namespaces really correct and do you have N\b\bar as using statement?
  • 0
    @dsteiner I think so. I've triple checked the namespace calls. They're correct. I don't have a use on the function itself.
  • 1
    I can try to spin up an example later today - it's time for bed now but i'll be at the office in about 6 hours and can send you an example then
  • 0
    It's all good. I'm done work for today but I'm stuck on this.
  • 1
    ew php
  • 0
    Are you using your own autoloader? Then send it here.
  • 1
    Sorry for wasting everyone's time. It was a typo.

    IT WAS A FUCKING TYPO!!

    I even copy pasted it, or so I thought. I spent the morning recreating everything and it all went smoothly but when I added it to my current project it didn't work. Until I opened the working and non-working files side by side and saw the different spelling.

    I feel stupid now. -_-
  • 0
    Boy this is not StackOverflow
Add Comment