Alan,

There was a discussion about this a long time ago and it was decided not to 
support this.
The main reasoning behind this is that we don't want to start supporting 
all other reserved words.
It's one of the things you'll need to cope with when moving to the Engine 2 
but a very simple search&replace on your project should do the trick.

Thanks anyway,
Andi

At 03:06 PM 7/6/2002 +0800, Alan Knowles wrote:
>Attached hopefully is a patch to allow method names called delete .- not 
>functions though..
>
>Speedwise it should not affect performance as its a very small compile 
>time issue..
>
>this would save me an a few others a bit of pain :)
>
>thoughts
>
>regards
>alan
>
>
>
>
>
>
>
>Index: zend_language_parser.y
>===================================================================
>RCS file: /repository/ZendEngine2/zend_language_parser.y,v
>retrieving revision 1.59
>diff -u -r1.59 zend_language_parser.y
>--- zend_language_parser.y      29 Jun 2002 15:38:40 -0000      1.59
>+++ zend_language_parser.y      6 Jul 2002 06:58:49 -0000
>@@ -429,6 +429,8 @@
>                 class_variable_decleration ';'
>         |       class_constant_decleration ';'
>         |       T_FUNCTION { $1.u.opline_num = CG(zend_lineno); } 
> is_reference T_STRING { zend_do_begin_function_declaration(&$1, &$4, 1, 
> $3.op_type TSRMLS_CC); } '('
>+                       parameter_list ')' '{' inner_statement_list '}' { 
>zend_do_end_function_declaration(&$1 TSRMLS_CC); }
>+       |       T_FUNCTION { $1.u.opline_num = CG(zend_lineno); } 
>is_reference T_DELETE { zend_do_begin_function_declaration(&$1, &$4, 1, 
>$3.op_type TSRMLS_CC); } '('
>                         parameter_list ')' '{' inner_statement_list '}' { 
> zend_do_end_function_declaration(&$1 TSRMLS_CC); }
>         |       T_OLD_FUNCTION { $1.u.opline_num = CG(zend_lineno); } 
> is_reference T_STRING { zend_do_begin_function_declaration(&$1, &$4, 1, 
> $3.op_type TSRMLS_CC); }
>                         parameter_list '(' inner_statement_list ')' ';' { 
> zend_do_end_function_declaration(&$1 TSRMLS_CC); }
>alan:/usr/src/php/php4/Zend# cvs diff -u zend_language_scanner.l
>Index: zend_language_scanner.l
>===================================================================
>RCS file: /repository/ZendEngine2/zend_language_scanner.l,v
>retrieving revision 1.51
>diff -u -r1.51 zend_language_scanner.l
>--- zend_language_scanner.l     10 Apr 2002 21:33:34 -0000      1.51
>+++ zend_language_scanner.l     6 Jul 2002 06:59:32 -0000
>@@ -626,6 +626,9 @@
>  }
>
>  <ST_IN_SCRIPTING>"delete" {
>+       zendlval->value.str.val = (char *)estrndup(yytext, yyleng);
>+       zendlval->value.str.len = yyleng;
>+       zendlval->type = IS_STRING;
>         return T_DELETE;
>  }
>


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to