AW: [PECL-DEV] Compare Values

From: Date: Sun, 27 Jun 2004 16:52:01 +0000
Subject: AW: [PECL-DEV] Compare Values
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-898@lists.php.net to get a copy of this message
Hi > Hi Frank, > > What you really want to use is zend_parse_parameters, and it > will correctly > handle the conversions for you. > > PHP_FUNCTION(checkval) > { > char *val; > int vallen; > > if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, > "s", &val, &vallen)) { > return; > } > > if (0 == strncmp(val, "1234567890", 10)) { > ... first 10 chars are equal .... > } > } > > > Easier then i have thought. Thanks a lot. Frank ____________ Virus checked by Antivirus-Profi-Paket Version: AVK 14.0.1217 from 19.06.2004 Virus news: www.antiviruslab.com

« previous php.pecl.dev (#898) next »