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
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.
Password:
Status:
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

Add a Patch

Pull Requests

Add a Pull Request

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: Sun May 19 01:01:30 2024 UTC