Bug #74188 [Com]: Null coalescing operator fails for undeclared static class properties

From: Date: Tue, 11 Apr 2017 13:26:03 +0000
Subject: Bug #74188 [Com]: Null coalescing operator fails for undeclared static class properties
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-208479@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74188&edit=1 ID: 74188 Comment by: tpunt@php.net Reported by: pandenitz at mail dot ru Summary: Null coalescing operator fails for undeclared static class properties Status: Closed Type: Bug Package: Variables related Operating System: Win 7 64 PHP Version: 7.0.16 Assigned To: tpunt Block user comment: N Private report: N New Comment: This issue was fixed in the 7.0, 7.1, and master branches. It should therefore be in the 7.0.19 and 7.1.5 releases next month. Previous Comments: ------------------------------------------------------------------------ [2017-04-11 07:08:50] pandenitz at mail dot ru Why the issue was closed? ------------------------------------------------------------------------ [2017-03-28 06:08:23] pandenitz at mail dot ru We can use isset() for variables as well :) Why not to make it work with constants? Anyway, static class properties are more important. ------------------------------------------------------------------------ [2017-03-27 19:11:58] tpunt@php.net The null coalescing operator should not be used to check whether a constant has been defined or not - that's what the defined() function is for. ------------------------------------------------------------------------ [2017-03-27 08:10:43] pandenitz at mail dot ru Same for class constants. ------------------------------------------------------------------------ [2017-03-01 17:05:48] pandenitz at mail dot ru I guess it's same in PHP 7.1 ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=74188 -- Edit this bug report at https://bugs.php.net/bug.php?id=74188&edit=1

« previous php.bugs (#208479) next »