reduce ( $callback, $bind )

Alias for filter(). This functionality was incorrectly named reduce in earlier versions of the SDK.

Access

public

Parameters

Parameter

Type

Required

Description

$callback

string
function

Required

The callback function to execute. PHP 5.3 or newer can use an anonymous function.

$bind

mixed

Optional

A variable from the calling scope to pass-by-reference into the local scope of the callback function.

Returns

Type

Description

CFArray

A new CFArray object containing the return values.

Source

Method defined in utilities/array.class.php | Toggle source view (4 lines) | View on GitHub

public function reduce($callback, &$bind = null)
{
    return $this->filter($callback, $bind);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback