summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHartmut Holzgraefe <hholzgra@php.net>2003-04-26 15:34:10 +0000
committerHartmut Holzgraefe <hholzgra@php.net>2003-04-26 15:34:10 +0000
commitac2287200691784e76c6f7e04dc29dc1e778cb65 (patch)
tree8c6815cbbfa0c5f54b2567f0059010bc2e483286 /scripts
parent5b665eb3672762d468434ff6d3e5621b48f2c928 (diff)
downloadphp-git-ac2287200691784e76c6f7e04dc29dc1e778cb65.tar.gz
better 'name' regex
Diffstat (limited to 'scripts')
-rw-r--r--scripts/ext_skel_ng/php_element.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/ext_skel_ng/php_element.php b/scripts/ext_skel_ng/php_element.php
index bbbdc8bb5e..4e17d297f7 100644
--- a/scripts/ext_skel_ng/php_element.php
+++ b/scripts/ext_skel_ng/php_element.php
@@ -1,6 +1,7 @@
<?php
class php_element {
+
function is_type($name) {
$types = array("void" => "void",
"bool" => "bool",
@@ -18,7 +19,7 @@ class php_element {
"callback" => "callback",
);
- if(isset($types[$name])) {
+ if (isset($types[$name])) {
return $types[$name];
} else {
return false;
@@ -26,7 +27,7 @@ class php_element {
}
function is_name($name) {
- if(ereg("[a-zA-Z0-9_]",$name)) {
+ if (ereg("^[[:alpha:]_][[:alnum:]_]*$",$name)) {
// TODO reserved words
return true;
}
@@ -49,7 +50,7 @@ class php_element {
function docbook_editor_footer($level=3) {
return '
<!-- Keep this comment at the end of the file
-Local variables:
+Local'.' variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t