xref: /PHP-7.4/Zend/tests/self_or.phpt (revision 67d90a48)
1--TEST--
2ORing 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(127)
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(45345)
37string(1) "f"
38string(2) "ff"
39Done
40