#27148 [Opn->Ctl]: print() method is not allowed

From: Date: Thu, 05 Feb 2004 11:45:46 +0000
Subject: #27148 [Opn->Ctl]: print() method is not allowed
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-54449@lists.php.net to get a copy of this message
 ID:               27148
 Updated by:       andrey@php.net
 Reported By:      andrey@php.net
-Status:           Open
+Status:           Critical
 Bug Type:         Zend Engine 2 problem
 Operating System: linux
 PHP Version:      5CVS-2004-02-04 (dev)


Previous Comments:
------------------------------------------------------------------------

[2004-02-04 13:07:36] andrey@php.net

Description:
------------
PHP5 (HEAD) complains when a class has a method named print(). Looks
like the yacc grammar have to modified to allow that. The example code
works without problems with 4.3.5-dev

Reproduce code:
---------------
php -r 'class a { function print(){}}'

Expected result:
----------------
no error

Actual result:
--------------
PHP Parse error:  parse error, unexpected T_PRINT, expecting T_STRING
in Command line code on line 1


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=27148&edit=1


Thread (6 messages)

« previous php.bugs (#54449) next »