xref: /PHP-7.2/Zend/tests/self_xor.phpt (revision 3c1a0d75)
1--TEST--
2XORing 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(109)
31
32Warning: A non-numeric value encountered in %s on line %d
33int(11)
34
35Notice: A non well formed numeric value encountered in %s on line %d
36int(45312)
37string(1) "F"
38string(2) "FF"
39Done
40