|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77324 date_parse_from_format() changed meaning of zone value in PHP 7.2 -> BC break
Submitted: 2018-12-20 13:38 UTC Modified: 2018-12-20 15:06 UTC
From: me at vasekpurchart dot cz Assigned:
Status: Not a bug Package: Reflection related
PHP Version: 7.3.0 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: me at vasekpurchart dot cz
New email:
PHP Version: OS:


 [2018-12-20 13:38 UTC] me at vasekpurchart dot cz
The property ReflectionClassConstant::class is documented as:

> Name of the class where the class constant is defined.

When using a hierarchy of classes and having constants defined on multiple levels this does return the child class where the constant is not defined.

Although using ReflectionClassConstant::getDeclaringClass() returns the correct one. In fact these two should point to the same class.

Test script:

Expected result:
ReflectionClassConstant::class should return the class where the constant is really declared as stated in the docs.

This would also mean, that $constant->class === $constant->getDeclaringClass()->getName() is true.

This would also bring the constants in line with methods and properties, where this works correctly (as can be seen for example here


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-12-20 13:40 UTC] me at vasekpurchart dot cz
-Status: Open +Status: Closed
 [2018-12-20 13:40 UTC] me at vasekpurchart dot cz
Bug system + browser overwrote title, so closing to avoid confusion and will resubmit.
 [2018-12-20 15:06 UTC]
-Status: Closed +Status: Not a bug
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Dec 04 13:01:27 2023 UTC