Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

PHP is awesome

Name: Anonymous 2007-08-28 17:56 ID:xY3vpdBA

This is how you create a anonymous function in PHP:

$newfunc = create_function('$a,$b', 'return "ln($a) + ln($b) = " . log($a * $b);');


Name: Anonymous 2007-08-30 11:45 ID:Heaven

>>35
an even better example of recursion with anonymous functions:
function(n){
 return (function(i){
   return i==1?0:arguments.callee(i-1)+(function(){
    return i==1?1:arguments.callee.caller(i-1)
   })(i-1)
  })(n+1)
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List