php-src/Zend/tests/bw_or_assign_with_ref.phpt
Nikita Popov 2622cfc2fb Deref right value for compound assign ops
Currently we do not support IS_REFERENCE operands for most of our
*_function's (should we?), so we need to deref here.
2014-10-13 15:31:59 +02:00

15 lines
159 B
PHP

--TEST--
Bitwise or assign with referenced value
--FILE--
<?php
$num1 = 1;
$num2 = '2';
$ref =& $num2;
$num1 |= $num2;
var_dump($num1);
?>
--EXPECT--
int(3)