Pass function as parameter in PHP
Posted
by Casidiablo
on Stack Overflow
See other posts from Stack Overflow
or by Casidiablo
Published on 2010-04-23T16:56:29Z
Indexed on
2010/04/23
17:03 UTC
Read the original article
Hit count: 309
Hello everybody!
I've been wondering whether is possible or not to pass a function as parameter in PHP; I want something like when you're programming in JS:
object.exampleMethod(function(){
// some stuff to execute
});
What I want is to execute that function somewhere in exampleMethod. Is that possible in PHP?
Thank you so much.
© Stack Overflow or respective owner