For example, we see

$validation_rules['base']['min'] = array(
    'name' => 'min',
    'description' => t('Min'),
    'default_value' => '10',
    'message' => t('Please enter a value greater than or equal to {0}.'),
  );

Then, we dmp:

// min (Array, 4 elements)
  //  name (String, 3 characters ) min | (Callback) min();
  //  description (String, 3 characters ) Min | (Callback) Min();
   // default_value (String, 2 characters ) 10
  //  message (String, 50 characters ) Please enter a value greater than or equal to {0}.

can some one tell us why there is a callback with name ?

Comments

Stefan Lehmann’s picture

Because devel is doing:

if (is_callable($data)) { // Add "Callback" label }

.. and there is a PHP function for "min":
http://php.net/manual/en/function.min.php

So it's just a coincidence!

:-)

I like cookies!

qqboy’s picture

can you explain a little bit more.
i feel difficult to understand.

Jaypan’s picture

dpm() automatically adds a path to the callback function, if the callback function exists. min() exists, so the path to the callback function is added to the array. It's coincidence in this case, as you are not calling min(). The dpm() function is just trying to give some additional information as a helper.