Req #72059 [Opn->Csd]: ?? is not allowed on constant expressions
| From: | marcio@php.net | Date: | Thu, 21 Apr 2016 00:35:04 +0000 |
| Subject: | Req #72059 [Opn->Csd]: ?? is not allowed on constant expressions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-200671@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=72059&edit=1
ID: 72059
Updated by: marcio@php.net
Reported by: marcio@php.net
Summary: ?? is not allowed on constant expressions
-Status: Open
+Status: Closed
Type: Feature/Change Request
Package: *General Issues
PHP Version: 7.0.6RC1
-Assigned To:
+Assigned To: marcio
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2016-04-19 17:01:21] marcio@php.net
Description:
------------
The null coalescing operator (??) is not supported on constant expressions https://3v4l.org/ANcaQ
Test script:
---------------
<?php new class { private $x = null ?? 'foo'; };
Expected result:
----------------
No errors.
Actual result:
--------------
Fatal error: Constant expression contains invalid operations in {file} on line {line}
Process exited with code 255.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=72059&edit=1