Bug #76979 [Opn->Csd]: define() error message does not mention resources as valid values

From: Date: Sat, 06 Oct 2018 09:22:58 +0000
Subject: Bug #76979 [Opn->Csd]: define() error message does not mention resources as valid values
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-217444@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76979&edit=1 ID: 76979 Updated by: nikic@php.net Reported by: bugs dot php dot net at majkl578 dot cz Summary: define() error message does not mention resources as valid values -Status: Open +Status: Closed Type: Bug Package: Scripting Engine problem Operating System: - PHP Version: 7.3.0RC2 Block user comment: N Private report: N New Comment: Automatic comment on behalf of me@majkl.me Revision: http://git.php.net/?p=php-src.git;a=commit;h=0a6ddc77224f86cef4f08c662bd96ede11616c8e Log: Fix bug #76979: define() error message does not mention resources as valid values Previous Comments: ------------------------------------------------------------------------ [2018-10-05 22:24:08] bugs dot php dot net at majkl578 dot cz Description: ------------ Resources are valid values for constants. This is also documented in php-langspec: https://github.com/php/php-langspec/blob/be010b4435e7b0801737bb66b5bbdd8f9fb51dde/spec/06-constants.md#constants§ Test script: --------------- <?php define('FOO', new stdClass()); Expected result: ---------------- Warning: Constants may only evaluate to scalar values, arrays or resources Actual result: -------------- Warning: Constants may only evaluate to scalar values or arrays ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76979&edit=1

« previous php.bugs (#217444) next »