$divisible = array(
1 => create_function('$n',
'echo "$n is divisible by 1
";'),
2 => create_function('$n',
'if ($n % 2 == 0) {
echo "$n is divisible by 2.
"; }'),
3 => create_function('$n',
'if ($n % 3 == 0) {
echo "$n is divisible by 3.
"; }'),
4 => create_function('$n',
'if ($n % 4 == 0) {
echo "$n is divisible by 4.
"; }'),
5 => create_function('$n',
'if ($n % 5 == 0) { echo "$n is divisible by 5.
"; }'),
);
foreach($divisible as $func) {
$func(2000);
}
?>