You are here

function rules_php_eval_return in Rules 6

Same name and namespace in other branches
  1. 7.2 modules/php.eval.inc \rules_php_eval_return()

Evalutes 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

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

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

Return value

The return value of eval

Related topics

1 string reference to 'rules_php_eval_return'
rules_input_evaluator_php_apply in rules/modules/php.rules.inc
Apply the input evaluator.

File

rules/modules/php.rules.inc, line 104
rules integration for the php module This provides an php input evaluator as well as a execute php code action.

Code

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