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





-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to