php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #55515 Accessing an undefined constant in a calss gives Fatal Error on Windows
Submitted: 2011-08-26 22:04 UTC Modified: 2013-02-18 00:35 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: shehabic at gmail dot com Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 5.3.8 OS: Windows ( any version )
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: shehabic at gmail dot com
New email:
PHP Version: OS:

 

 [2011-08-26 22:04 UTC] shehabic at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.constant%23Errors/Exceptions
---


Accessing an undefined constant in a calss gives Fatal Error on Windows

while it gives a E_Warning on Linux Versions of PHP 

Expected result:
----------------
Giving the same error on both platforms


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-04-13 20:59 UTC] nikic@php.net
-Status: Open +Status: Feedback
 [2012-04-13 20:59 UTC] nikic@php.net
I can't reproduce this.

Here is what I tried:

$ /c/php-5.3.8/php -r 'class Foo{} echo constant("Foo::FOO");'

Warning: constant(): Couldn't find constant Foo::FOO in Command line code on lin
e 1

Could you maybe provide a full reproduce test script?
 [2013-02-18 00:35 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Oct 05 19:01:27 2024 UTC