generalize the zend_long stuff
fix func argument type