xref: /PHP-7.1/Zend/tests/self_and.phpt (revision 7af945e2)
1--TEST--
2ANDing strings
3--FILE--
4<?php
5
6$s = "123";
7$s1 = "test";
8$s2 = "45345some";
9$s3 = str_repeat("f", 1);
10$s4 = str_repeat("f", 2);
11
12$s &= 22;
13var_dump($s);
14
15$s1 &= 11;
16var_dump($s1);
17
18$s2 &= 33;
19var_dump($s2);
20
21$s3 &= " ";
22var_dump($s3);
23
24$s4 &= "  ";
25var_dump($s4);
26
27echo "Done\n";
28?>
29--EXPECTF--
30int(18)
31
32Warning: A non-numeric value encountered in %s on line %d
33int(0)
34
35Notice: A non well formed numeric value encountered in %s on line %d
36int(33)
37string(1) " "
38string(2) "  "
39Done
40