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 Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
12 + 47 = ?
Subscribe to this entry?

 
 [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 Jun 02 07:01:30 2024 UTC