|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-08-01 13:24 UTC] cmb@php.net
[2015-08-01 13:42 UTC] bwoebi@php.net
-Status: Open
+Status: Not a bug
[2015-08-01 13:42 UTC] bwoebi@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 07 11:00:02 2026 UTC |
Description: ------------ Hi, i found a bug with use static function or normal function in define. If class has any interface -> Fatal error. Tested in PHP 5.4.x, 5.6.x and 7.x Test script: --------------- // Fatal error (if class is without interface it's ok) define ('XXX', Bagr::GetNew()->n); // Fatal error interface IBagr {} class Bagr implements IBagr { public $n = 1; public static function GetNew() { return new Bagr(); } } echo XXX; Expected result: ---------------- 1 Actual result: -------------- Fatal error: Uncaught Error: Class 'Bagr' not found in demo.php:3 Stack trace: #0 {main} thrown in demo.php on line 3