Jump to content

print CURRENCY_SYMBOL; displays "262145" (PHP 5.1.2)


pendelton

Recommended Posts

The follownig code works as expected in PHP 4, but not as expected in PHP 5.1.2.

I have just been baffled for hours wondering why the following code prints "262145" instead of the UK pound sign.

[code]
define(CURRENCY_SYMBOL, '£');
print CURRENCY_SYMBOL;
[/code]

Initially I thought that I had got my HTML code '£' mixed up. Then I eventually tried the following which also prints 262145.

[code]
define(CURRENCY_SYMBOL, 'hello');
print CURRENCY_SYMBOL;
[/code]

If I use CURRENCY_SYMBOL_1 for the define then everything works as expected. It seems that CURRENCY_SYMBOL must be defined in PHP's core somewhere and also their is no way to override its value (not that I want to now that I know what is going on).

Can anyone tell me what CURRENCY_SYMBOL is, and why its value is 262145 (at least on my server with my local)?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.