mirror of
https://github.com/php/php-src.git
synced 2024-11-27 11:53:33 +08:00
5bc1e224db
RFC: https://wiki.php.net/rfc/arithmetic_operator_type_checks Closes GH-5331.
20 lines
233 B
PHP
20 lines
233 B
PHP
--TEST--
|
|
XORing arrays
|
|
--FILE--
|
|
<?php
|
|
|
|
$a = array(1,2,3);
|
|
$b = array();
|
|
|
|
try {
|
|
$c = $a ^ $b;
|
|
} catch (TypeError $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
|
|
echo "Done\n";
|
|
?>
|
|
--EXPECT--
|
|
Unsupported operand types: array ^ array
|
|
Done
|