#30208 [Opn->Fbk]: Strange Notice when trying to define the same constant twice

From: Date: Tue, 28 Sep 2004 20:49:34 +0000
Subject: #30208 [Opn->Fbk]: Strange Notice when trying to define the same constant twice
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-66820@lists.php.net to get a copy of this message
ID: 30208 Updated by: sniper@php.net Reported By: jaenecke@php.net -Status: Open +Status: Feedback -Bug Type: *General Issues +Bug Type: Scripting Engine problem Operating System: Slackware Linux PHP Version: 4.3.8 New Comment: 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..) Previous Comments: ------------------------------------------------------------------------ [2004-09-23 15:53:22] 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. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30208&edit=1

« previous php.bugs (#66820) next »