On Sat, Jan 05, 2002 at 02:10:17PM -0600, Brian Foddy wrote : > 2. Overload the function arguments and check which type of arg is being > passed.
Just accept a ZVAL and do your appropriate conversion later on. > > Questions... > 2. How difficult / successful is it to test the arg type for solution 2. It's a matter of switch(Z_TYPE_P(zval_container)) { case IS_STRING: // do appropriate conversion break; case IS_LONG: // everythings fine break; default: php_error(E_WARNING, "%s(): argument 1 must be integer or string", get_active_function_name(TSRMLS_C)); RETURN_FALSE; } IMHO. Watch out, YMMV; HTH. -- Please always Cc to me when replying to me on the lists. -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]