xref: /PHP-7.2/Zend/tests/not_002.phpt (revision 17ccbeec)
1--TEST--
2bitwise NOT and arrays
3--FILE--
4<?php
5
6$a = array(1,2,3);
7$b = array(1,2);
8
9try {
10	var_dump(~$b);
11} catch (Error $e) {
12	echo "\nException: " . $e->getMessage() . "\n";
13}
14
15$a = ~$b;
16var_dump($a);
17
18echo "Done\n";
19?>
20--EXPECTF--
21Exception: Unsupported operand types
22
23Fatal error: Uncaught Error: Unsupported operand types in %s:%d
24Stack trace:
25#0 {main}
26  thrown in %s on line %d
27