PHP: function called with leading null parameter gets null inside

I created a php function (5.2.6), simple as it is:

a.php file:

function la ($n) {
    echo "$n";
}

b.php file:

include ('a.php');
// got many calls of function with leading zero in parameter
la (01);
la (02);
...
la (07);
la (08);
la (09);
la (10);

Sometimes it prints 1, 2 ... 9, 10, sometimes it prints 0 instead of 8 or 9! It looks random. What for? Why only 8 or 9? In fact, I can avoid this zero. But, since I found strange behavior, I want to ask you: what is the secret of this strange behavior? Or am I weird. Thank.

+3
source share
2 answers

Leading 0 , ; 8 9 . ( , , PHP , -.)

+6

, string, , :

la ('07');
0

All Articles