PHP, The Closure class

Viewed 4285

I am trying to understand about the closure class, at the manual there is, All at the manual Link,

Closure::__construct - Constructor that disallows instantiation. If i understand it right the only instance of this class is for anonymous function variable assignment.

But i did not understand few lines:

Closure::bind — Duplicates a closure with a specific bound object and class scope.

Closure::bindTo — Duplicates the closure with a new bound object and class scope.

And the last at the manual i did not understand this sentence:

Besides the methods listed here, this class also has an __invoke method. This is for consistency with other classes that implement calling magic, as this method is not used for calling the function.

If can some one please try to explain thoes lines to me i will be very thankful, Have a nice day.

2 Answers
Related