Axiom (v1.2.0)

A lightweight PHP framework
H:/Workspace/php-axiom/www/php-axiom/libraries/util/functions.php File Reference

Go to the source code of this file.

Functions

 array_safe_filter (array &$array, array $exclude=array())
 callback ($fct)
 Create an annonymous function.
 array_cartesian_product ()
 Calculates the cartesian product of any number of array in parameter.

Function Documentation

Calculates the cartesian product of any number of array in parameter.

Parameters:
mixed$a
mixed$b[...]
Returns:
array

Definition at line 62 of file functions.php.

array_safe_filter ( array &$  array,
array $  exclude = array() 
)

all null, false or empty string values from an array

The keys are preserved.

Parameters:
array$array
array$exclude[optional] [default array()] Additionnal values to exclude
Returns:
void

Definition at line 23 of file functions.php.

callback ( fct)

Create an annonymous function.

Usage:

 $alpha = callback('function ($a,$b) { return $a+$b+$c+$d; }');

Returns the anonymous function name

Parameters:
string$fct
Returns:
string

Definition at line 45 of file functions.php.

 All Data Structures Files Functions Variables