Jump to content

trim() with numbers with leading zeros, possible bug


JustinK101

Recommended Posts

Leading zero's on numbers make them OCTAL.

 

Trim is a string function anyway. To get the correct results (for the example you posted), you would need to make your number into a string, either by enclosing it in quotes or casting it as a string. Edit: casting the number as a string doesn't work. Only enclosing it in quotes where you assigned it to the $number variable works.

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.