From:             [EMAIL PROTECTED]
Operating system: Slackware Linux
PHP version:      4.3.8
PHP Bug Type:     *General Issues
Bug description:  Strange Notice when trying to define the same constant twice

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 ;[EMAIL PROTECTED] already defined in [...]/sub.php on line 2
MAIN

The weird chars for the constant name differ.


-- 
Edit bug report at http://bugs.php.net/?id=30208&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30208&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30208&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30208&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30208&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30208&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30208&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30208&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30208&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30208&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30208&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=30208&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=30208&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30208&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30208&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30208&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30208&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30208&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30208&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30208&r=mysqlcfg

Reply via email to