FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Strange: var_dump( 012 );





imagefree
Check this.
Code:
var_dump( 012 );

It gives the following Output
Code:
int(10)


Is this a bug or something?
jmraker
Nope, many programming languages parse hard coded numbers with a leading zeros as an octal number (base 8 ) or a hexadecimal number if an 'x' is the 2nd letter.

Like at http://php.net/manual/en/function.umask.php
where 0777 represents an octal number (0777 isn't read as a base 10 number.)
http://php.net/manual/en/language.types.integer.php
Related topics
Strange Fire fox problem
Czego aktualnie sluchasz
Strange Mysql-database
Strange "mysql_num_rows()" error (Solved)
Seriously strange Phpbb forum problem
Strange cracking sound in converted mp3
Check strange file(or your computer) for viruses on-line
Never Mind Problem Resolved
a strange story
Server 2 strange 403/404 error but the page exists
Strange storie abiut a dog and a guinea pig.
Strange
Photoshop Rendering
Strange fonts on line
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.