xref: /php-src/Zend/tests/not_002.phpt (revision 5bc1e224)
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: Cannot perform bitwise not on array
22
23Fatal error: Uncaught TypeError: Cannot perform bitwise not on array in %s:%d
24Stack trace:
25#0 {main}
26  thrown in %s on line %d
27