Good day, dear colleagues. Actually, at his leisure, he looked at the man and remembered the namespaces in php, attention to the question: What is the real practical meaning of using them?
I’ll enter not __autoload
with __autoload
, etc., there you can do without them, but what is the real use? Personally, I suspect that I didn’t have any (once I remembered them by chance and after learning the basics of php I never returned to them), although again we are all sinners and maybe I’m writing heresy ...
If I am mistaken (and I wrote the heresy), I would be very grateful for a piece of some illustrative code, you can just poke a script, libu, etc. It is important that in the example you cited their use was justified and useful. Please shed light on this question, thanks in advance :)
PS: Why the hell they ask about them at the interviews, I don’t understand at all ... They asked a friend, but he didn’t know what it was, although IMHO is a normal programmer ...
"use MyLib; echo MyFunc();"
writing is easier than"echo MyLib::MyFunc();"
- Sh4dowget_defined_functions
^___^
- Sh4dowget_defined_functions
is harsh ^^ - Zowie