1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
--TEST-- bitwise OR and strings --FILE-- <?php $s = "323423"; $s1 = "2323.555"; var_dump($s | $s1); var_dump($s1 | $s); $s = "some"; $s1 = "test"; var_dump($s | $s1); $s = "some"; $s |= "test"; var_dump($s); echo "Done\n"; ?> --EXPECTF-- string(8) "3337>755" string(8) "3337>755" string(4) "wou" string(4) "wou" Done