1--TEST--
2Test array_reduce() function : variation - object callbacks
3--FILE--
4<?php
5echo "*** Testing array_reduce() : variation - object callbacks ***\n";
6
7class A {
8  static function adder($a, $b) {return $a + $b;}
9  public function adder2($a, $b) {return $a + $b;}
10}
11
12$array = array(1);
13
14echo "\n--- Static method callback ---\n";
15var_dump(array_reduce($array, array("A", "adder")));
16
17echo "\n--- Instance method callback ---\n";
18var_dump(array_reduce($array, array(new A(), "adder2")));
19
20?>
21--EXPECT--
22*** Testing array_reduce() : variation - object callbacks ***
23
24--- Static method callback ---
25int(1)
26
27--- Instance method callback ---
28int(1)
29