xref: /php-src/Zend/tests/and_001.phpt (revision 9c144e0d)
1--TEST--
2bitwise AND and strings
3--FILE--
4<?php
5
6$s = "123";
7$s1 = "234";
8
9var_dump($s & $s1);
10
11$s = "test";
12$s1 = "some";
13
14var_dump($s & $s1);
15
16$s = "test long";
17$s1 = "some";
18
19var_dump($s & $s1);
20
21$s = "test";
22$s1 = "some long";
23
24var_dump($s & $s1);
25
26$s = "test";
27$s &= "some long";
28
29var_dump($s);
30
31echo "Done\n";
32?>
33--EXPECT--
34string(3) "020"
35string(4) "pead"
36string(4) "pead"
37string(4) "pead"
38string(4) "pead"
39Done
40