tags:

views:

68

answers:

3
+1  Q: 

Echo 05000 ? PHP

Could some one please Explain why echo 05000 = 2560 ??? i don't get it , i tried to search over the net i didn't find it somewhere Thank you

+3  A: 

It's a string integer literal in octal notation.

You can do base conversions with base_convert. Example:

echo base_convert("5000", 8, 10); //echoes "2560"

See Positional notation.

Artefacto
+5  A: 
John Kugelman
+8  A: 

05000 is octal notation, 2560 is decimal notation.

Sjoerd