S
S
Sasha Brahms2015-11-20 11:18:18
PHP
Sasha Brahms, 2015-11-20 11:18:18

How to use constructs like (array($class, 'method'), array(..) in function parameters?

I began to often see that the following constructions are passed as function parameters:

myFunc(array($class,'_method'), array($class, 'two_method), ... );

How to use it and how does it work?
I absolutely don’t understand, and how to formulate a question to Google too, throw in some literature, please)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Mokhov, 2015-11-20
@mokhovcom

looks like a callback
I think this information will be useful to you: call_user_func

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question