Re: function to check variable name?
| From: | Andrey Zmievski | Date: | Thu, 04 Feb 1999 04:28:56 +0000 |
| Subject: | Re: function to check variable name? | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-3877@lists.php.net to get a copy of this message | ||
At 07:46 PM 2/3/99 -0800, Lars Torben Wilson wrote:
>There isn't, but a simple basis for a test would be to check whether
>it matches PHP's rules using ereg():
>
> function valid_name( $string ) {
> return ereg( "^[[:alpha:]_]{1}[[:alnum:]_]*$", $string );
> }
>
Right, but I need that in C...
-Andrey
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net