Bug #78925 [Opn->Nab]: Can't preload class ... with unresolved initializer for property ...
| From: | nikic@php.net | Date: | Sun, 08 Dec 2019 07:48:11 +0000 |
| Subject: | Bug #78925 [Opn->Nab]: Can't preload class ... with unresolved initializer for property ... | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-224124@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78925&edit=1
ID: 78925
Updated by: nikic@php.net
Reported by: nexor1984 at gmail dot com
Summary: Can't preload class ... with unresolved initializer
for property ...
-Status: Open
+Status: Not a bug
Type: Bug
Package: opcache
Operating System: Linux
PHP Version: 7.4.0
-Assigned To:
+Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
Constants are not preloaded, you cannot preload classes making use of (non-internal) constants in
initializers.
@dmitry: I don't quite remember why we can't preload constants, what was the reason for
this?
Previous Comments:
------------------------------------------------------------------------
[2019-12-07 22:18:16] nexor1984 at gmail dot com
Description:
------------
Trying to preload a file like:
<?php
define('PEAR_ERROR_RETURN', 1);
class PEAR_Error
{
var $mode = PEAR_ERROR_RETURN;
}
gives an error:
PHP Warning: Can't preload class PEAR_Error with unresolved initializer for property $mode in
/var/www/html/phptest/lib/pear/PEAR.php on line 5
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78925&edit=1