Also commit a test I forgot.
--- /dev/null
+--TEST--
+Identical comparison of array with references
+--FILE--
+<?php
+
+$foo = 42;
+$array1 = [&$foo];
+$array2 = [$foo];
+var_dump($array1 === $array2);
+
+?>
+--EXPECT--
+bool(true)
--- /dev/null
+--TEST--
+Throw reference
+--FILE--
+<?php
+
+$e = new Exception;
+$ref =& $e;
+throw $e;
+
+?>
+--EXPECTF--
+Fatal error: Uncaught exception 'Exception' in %s:%d
+Stack trace:
+#0 {main}
+ thrown in %s on line %d
* whereas this comparison function is expected to return 0 on identity,
* and non zero otherwise.
*/
+ ZVAL_DEREF(z1);
+ ZVAL_DEREF(z2);
if (is_identical_function(&result, z1, z2 TSRMLS_CC)==FAILURE) {
return 1;
}