I benched instantiating a function and lambda function.
Functions used:
<?php
function data() {
$var = 'hi';
}
$lambda = function() {
$var = 'hi';
}
?>
Bench for instantiating a function:
1.692800000000000082422957 μs
Bench for instantiating Lambda Function:
0.906000000000000027533531 μs
Bench for calling function:
0.7153000000000000468958206 μs
Bench for calling lambda function:
0.6914000000000000145661261 μs
Calling the lambda function and regular function fluctuates between .81 and .65 so they seem to be the same.
----
Server IP: 69.147.83.197
Probable Submitter: 64.134.239.114
----
Manual Page -- http://www.php.net/manual/en/functions.anonymous.php
Edit -- https://master.php.net/note/edit/102785
Del: integrated -- https://master.php.net/note/delete/102785/integrated
Del: useless -- https://master.php.net/note/delete/102785/useless
Del: bad code -- https://master.php.net/note/delete/102785/bad+code
Del: spam -- https://master.php.net/note/delete/102785/spam
Del: non-english -- https://master.php.net/note/delete/102785/non-english
Del: in docs -- https://master.php.net/note/delete/102785/in+docs
Del: other reasons-- https://master.php.net/note/delete/102785
Reject -- https://master.php.net/note/reject/102785
Search -- https://master.php.net/manage/user-notes.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.