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-29 12:55 ID:rHpyrffL

>>1
PHP's anonymous functions are putrid. Trust me, tried using them for a real live project.

All it does is have the interpreter make a function called something gay like __LAMBDA001 and so forth. You have to assign a name to that.

They run slower than slowpoke, they are a horrible security risk since it blindly passes the input into the interpreter, they can't be GC'd well (but PHP's GC already sucks, so yeah...) and it's a bitch to get one lambda inside another.

Don't fucking bother. Just make a fucking function. Save yourself some headahces.

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