Possible problem in the parser

[email protected] ("Andrey Hristov") Wed, 12 Mar 2003 19:18:38 +0200
Newsgroups php.dev
Message-ID <01ad01c2e8bb$6c261a40$1601a8c0@andreywin>
 Few minutes ago I found the following behaviour somehow wierd for me :
<?php
    $a = 1;
    $b = $a==1? 4:$a==2? 5:6;
    printf("a[%d]b[%d]\n", $a, $b);
?>
Prints : 
a[1]b[5]

Similar C program :
main()
{
    int a,b;
    a = 1;
    b = a==1? 4:a==2? 5:6;
    printf("a[%d]b[%d]\n", a, b);
}
Prints : 
a[1]b[4]

-=-=-=-=-=-
I think that the behavior of the C program is the right

Andrey