Posted by www.phpbasic.com on 11/03/07 17:37
i have a problem with interger number in PHP
<?php
class read{
var $num;
function read($num){
$this->num = $num;
}
function basic(){
print "NUM: ".($this->num);
}
}
$read = new read(001002);
$read->basic(); // Output string: NUM: 514
?>
if i call
$read = new read(1001);
$read->basic();//Output string: NUM: 1001
// is true
who can explain me about problem?
I run this script on local with PHP 5.2.1
Navigation:
[Reply to this message]
|