function rules_php_eval_return

Evaluates the given PHP code, with the given variables defined.

This is like rules_php_eval(), but does return the returned data from the PHP code.

Parameters

string $code: The PHP code to run, without <?php or ?>

array $arguments: Array containing variables to be extracted to the code.

Return value

The return value of the evaled code.

Related topics

2 calls to rules_php_eval_return()
RulesPHPDataProcessor::process in modules/php.eval.inc
Overrides RulesDataProcessor::process().
rules_execute_php_eval in modules/php.eval.inc
Action and condition callback: Execute PHP code.

File

modules/php.eval.inc, line 177

Code

function rules_php_eval_return($code, $arguments = array()) {
    extract($arguments);
    return eval($code);
}