From:             [EMAIL PROTECTED]
Operating system: Win2k
PHP version:      4.3.0
PHP Bug Type:     Strings related
Bug description:  define constants not taking heredoc strings as value

when using define() to create constants, it all seems to work fine when
using standard strings.

However, under the definition for the arguments on define(), it says that
the define function can take string() as an argument.

looking at strings, heredoc is a valid string argument, however when
trying to define a constant as follows, the constant returns a null
string.

define($html_header, <<<THISISSTRING
the string goes here
THISISSTRING
);

if however you define a standard var like so:

$str_header=<<<THISISSTRING
the string goes here
THISISSTRING
;

then do:

define($html_header $str_header);

all works fine.


-- 
Edit bug report at http://bugs.php.net/?id=21956&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=21956&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=21956&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=21956&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=21956&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=21956&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=21956&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=21956&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=21956&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=21956&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=21956&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21956&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=21956&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=21956&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=21956&r=gnused

Reply via email to