+ 1

if php supports bitwise and turnory operator????

and also increment and detriment???

20th Aug 2016, 8:22 AM
Ramjivan Jangid
Ramjivan Jangid - avatar
1 Réponse
+ 1
Yes PHP do support bitwise and ternary operators. <?php echo ( 2 | 1 ) . "\n"; // should be 3 (10) | (01) = (11) echo ( 2 & 1 ) . "\n"; // should be 0 (10) & (01) = (00) echo ( 2 ^ 1 ) . "\n"; // should be 3 (10) ^ (01) = (11) echo 1==1 ? "TRUE\n" : "FALSE\n"; echo 1!=1 ? "TRUE\n" : "FALSE\n"; ?> //output /* 3 0 3 TRUE FALSE */
20th Aug 2016, 4:52 PM
Satyajit Chakraborty