#22114 [Bgs]: @echo not working

From: Date: Fri, 07 Feb 2003 21:28:03 +0000
Subject: #22114 [Bgs]: @echo not working
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-32414@lists.php.net to get a copy of this message
ID: 22114 Updated by: helly@php.net Reported By: helly@php.net Status: Bogus Bug Type: Scripting Engine problem PHP Version: 5CVS-2003-02-07 (dev) New Comment: The following patch *is* not the beautiful way to solve it but is shows its working. Anyway it works when using print instead of echo which is handled as an expression. Index: Zend/zend_language_parser.y =================================================================== RCS file: /repository/ZendEngine2/zend_language_parser.y,v retrieving revision 1.86 diff -u -r1.86 zend_language_parser.y --- Zend/zend_language_parser.y 1 Feb 2003 01:49:14 -0000 1.86 +++ Zend/zend_language_parser.y 7 Feb 2003 21:25:05 -0000 @@ -202,6 +202,7 @@ | T_GLOBAL global_var_list ';' | T_STATIC static_var_list ';' | T_ECHO echo_expr_list ';' + | '@' { zend_do_begin_silence(&$1 TSRMLS_CC); } T_ECHO echo_expr_list ';' { zend_do_end_silence(&$1 TSRMLS_CC); $$ = $3; } | T_INLINE_HTML { zend_do_echo(&$1 TSRMLS_CC); } | expr ';' { zend_do_free(&$1 TSRMLS_CC); } | T_USE use_filename ';' { zend_error(E_COMPILE_ERROR,"use: Not yet supported. Please use include_once() or require_once()"); zval_dtor(&$2.u.constant); } Previous Comments: ------------------------------------------------------------------------ [2003-02-07 15:08:43] helly@php.net I know of corse but shouldn't it be allowed for echo, too? ------------------------------------------------------------------------ [2003-02-07 15:04:43] derick@php.net echo is not a function, but a language construct. Not a bug -> bogus. ------------------------------------------------------------------------ [2003-02-07 14:57:35] helly@php.net One cannot use '@' to hide warnings inside 'echo'. Example: [marcus@zaphod php-HEAD]$ php -r '@echo "<$x>";' Command line code(1) : Parse error - parse error, unexpected T_ECHO ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22114&edit=1

« previous php.bugs (#32414) next »