A Simple Anonymous Function : create_function « Functions « PHP






A Simple Anonymous Function

 
<html>
<body>
<div>
<?php
    $my_anon = create_function( '$a, $b', 'return $a+$b;' );
    print $my_anon( 3, 9 );
?>
</div>
</body>
</html>
  
  








Related examples in the same category

1.Dynamically Creating Functions