#43318 [Com]: Const accepts array

From: Date: Sun, 18 Nov 2007 03:35:57 +0000
Subject: #43318 [Com]: Const accepts array
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-119775@lists.php.net to get a copy of this message
ID: 43318 Comment by: crrodriguez+php at suse dot de Reported By: felipensp at gmail dot com Status: Open Bug Type: Scripting Engine problem PHP Version: 5.3CVS-2007-11-17 (snap) New Comment: in 5_3 there seems to be an issue ( maybe a change) that allows "const" outside classes, const outside class seems to be wrong though. in 5_2 it causes a "syntax error, unexpected T_CONST in.." Previous Comments: ------------------------------------------------------------------------ [2007-11-17 13:19:58] felipensp at gmail dot com Description: ------------ Const now accepts array? Reproduce code: --------------- <?php const foo = array(1, 2, 3); var_dump(foo); var_dump(constant('foo')); Expected result: ---------------- Error ? Actual result: -------------- array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) } array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43318&edit=1

« previous php.bugs (#119775) next »