public
Last active

  • Download Gist
gistfile1.inc
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
<?php
 
// via wiping out possible options of validator
$validate = new Zend_Validate_Callback('is_numeric');
$validate ->setOptions(array());
 
 
// via create_function() callback
$callback = create_function('$v', 'return is_numeric($v);');
$validate = new Zend_Validate_Callback($callback);
 
 
// via anonymous function callback (for PHP >= 5.3)
$validate = new Zend_Validate_Callback(function($v){
return is_numeric($v);
});

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.