Anonymous recursive PHP functions
Is it possible to have a PHP function that is both recursive and anonymous? This is my attempt to get it to work, but it doesn’t pass in the function name. $factorial = function( $n ) use ( $factorial ) { if( $n <= 1 ) return 1; return $factorial( $n – 1 ) * … Read more