See if phalcon_get_intval() will be more appropriate here.