Ben yanlış cevap var. o yüzden sordum? i cevap veremedi. Herkes cevap yapabilir miyim? Bunu öğrenmek çok ilgileniyorum.
Bu kod:
var_dump(123);
var_dump(0123);
alacak:
int 123
int 83
123 ondalık iken 0123, sekizlik notaları (because of the 0 at the begining) çünkü bu.
For more informations, you can take a look at the Integer section of the manual.
An even trickier question would have been to ask about 79 and 079, for instance :
var_dump(79);
var_dump(079);
alacak:
int 79
int 7
(9 is not a valid digit in octal ;-) )
1) When we use == operator in php, it checks if values are equal. So 5=="5" => true 2) When we use === operator in php, it checks if values and data types are equal. So 5==="5" => false
123==0123 => false ALSO 123 === 0123 => false
123 is decimal number : 123 0123 is an octal number (as it starts with 0) : 83
123 83 eşit değildir