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)?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.