php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30208 Strange Notice when trying to define the same constant twice
Submitted: 2004-09-23 15:53 UTC Modified: 2004-10-07 01:00 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: jaenecke@php.net Assigned:
Status: No Feedback Package: Scripting Engine problem
PHP Version: 4.3.8 OS: Slackware Linux
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jaenecke@php.net
New email:
PHP Version: OS:

 

 [2004-09-23 15:53 UTC] jaenecke@php.net
Description:
------------
Redefining a constant in a required file produces a strange Notice.
This occurs on Commandline and Modul (both 4.3.8)

Reproduce code:
---------------
File main.php:
<?PHP
error_reporting( E_ALL );
define( 'FOO', 'MAIN' );
require_once( './sub.php' );
echo FOO;
?>

File sub.php:
<?PHP
define( 'FOO', 'SUB' );
?>

Expected result:
----------------
I would expect the Notice to complain about redefining FOO, not some weird chars.

Actual result:
--------------
Executing main.php (Commandline or Modul) I get ouptut like:

Notice: Constant ;?f@ already defined in [...]/sub.php on line 2
MAIN

The weird chars for the constant name differ.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-28 22:49 UTC] sniper@php.net
I can not reproduce with latest CVS. And what might have been your configure line?? With --enable-debug or not? Some wierd optimizations set for gcc?? etc. etc.. (People with @php.net addresses REALLY should know better to send better bug reports..)

 [2004-10-07 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Mar 13 21:01:32 2025 UTC