Safe casting functions

https://wiki.php.net/rfc/safe_cast
    zend_strpprintf(0, "%.*G", (int) EG(precision), Z_DVAL_P(var));

max_len is first parameter ... http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_exceptions.h#57