How to call a PHP function with dynamic generated function name? #978
Answered
by
GiovanniSalmeri
PetersOtto
asked this question in
Ask a question
-
Hello everyone! I have a variable that is filled dynamically. This variable contains the function name. How can I call the function? I am looking for something like this but in the right: 😬
Does anyone have an idea? |
Beta Was this translation helpful? Give feedback.
Answered by
GiovanniSalmeri
Jun 22, 2024
Replies: 1 comment 2 replies
-
Oh, I think I've found the answer myself. https://www.php.net/manual/en/functions.variable-functions.php Have a nice weekend! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also
call_user_func(array($this, $choosedFilter), $image);
should do the trick.