logo-MindMajix
PostPythonPython
A
Anand Sahu

Posted on 12th June 2024|71 views

0
votes

How to implement a callback in PHP?

Can someone help me out how to implement callback function in php ?

1 answers
Answers
P
Swetha Shetty

Posted on 12th June 2024| views

In PHP, callback means a function object or reference, including type callable. A callback or callable variable can work as a function, an object method also a static class method.

Here is an example:

<?php

  function myFunction() {

    echo "mindmajix \n";

}

  call_user_func('myFunction');

?>

 

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo

  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos
Name
Course *
Email *
Phone Number