What is a lambda function in php?



What is a lambda function in php?..

Answer / Abdul Kadir Quraishi

A lambda function, also known as anonymous functions or closures, in PHP is a function that can be created without a name. It's defined using the 'fn' keyword and is only available in PHP 8.0 and later versions. Lambda functions can capture variables from the outer scope and are useful for simple, one-off tasks.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

Explain about a search-friendly site looks like?

1 Answers  


<?php include ("db.php"); $result = mysql_query("SELECT ques_id FROM questionbank order by ques_id limit 5 "); while($obj=mysql_fetch_array($result)) { $ad1[$obj['ques_id']]++;//Used an array and inserted the database query results into it. } $rand_keys=array_rand($ad1,1); //Did a random array function echo "First random id = ".$ad1[$rand_keys[0]]; echo "<br>Second random id = ".$ad1[$rand_keys[1]]; ?> <!--Its not working. Have any solution for this. -->

1 Answers  


Tell me which function gives us the number of affected entries by a query?

1 Answers  


Which cryptographic extension provide generation and verification of digital signatures?

1 Answers  


Is age an interval or ratio?

1 Answers  


How do I escape data before storing it into the database?

1 Answers  


1.<?php echo'bsfjbsnmfbs'; ?> 2.<? ech'hjndfjkshf'; ?> 3 <? echo'naskfdjnask'; three programs are exected but which is beter why

3 Answers   HCL,


how to upload 100mb file using .htaccess..

2 Answers  


Which is best framework for php?

1 Answers  


Do you know what is the difference between mysql_fetch_object() and mysql_fetch_array()?

1 Answers  


What is isset php?

1 Answers  


What is the substitution of submit in PHP?

6 Answers   RedAlkemi,


Categories