Dynamic Function Call
×
Home Courses Community Support
Dynamic Function Call

In PHP we can assign function names as String to variables. And these variables can be used like function.

See below example -

<?php
function Name_Birth($Name, $Birth) {
    echo "My name is $Name and I was born on $Birth.<br>";
}
$x = Name_Birth("Anuj Kumar Saini", "February 23, 1988");
echo $x;
?>

Output:

My name is Anuj Kumar Saini and I was born on February 23, 1988.

 

 

← Preview

Value Return using Function

Next →

Working on Array

NOTES

Our mission is to provide highly effective and quality education via innovative solutions. Geeksdemy look forward to bridge the gap between in-demand technology and academics in order to deliver innovative, easy, interesting and affordable learning across the Globe.

Courses

  • Python
  • Game Development with Unity 3D
  • Arduino
  • PCB & Circuit Designing
  • Robotics and Embedded C
  • 8051/8052 Embedded Systems
  • QuadCopter & UAV
  • MATLAB with Robotics
  • Raspberry Pi
Learn On the Go!
Get the Android App
Get the iOS App