Assigning an OCTAL Value to the Variable.

Assigning an OCTAL Value to the Variable.

Assigning an OCTAL Value to the Variable.

To assign a Octal value to the PHP variable, by preceding or leading zeroes in the given value.
PHP Interpreter treats numbers beginning with 0 as octal.

Example:

echo $val = 123;
here, it returns the $val = 123.

But,    echo $val=0123;
here, it returns the $val = 83.

(The decimal value of 123 is 83).

Leave a Reply

You must be logged in to post a comment.


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.