1--TEST-- 2GH-10168: Wrong assign to variable 3--SKIPIF-- 4<?php 5if (defined('ZEND_VERIFY_TYPE_INFERENCE')) die('skip Destructor side-effects violate type inference'); 6?> 7--FILE-- 8<?php 9 10class Test { 11 function __destruct() { 12 unset($GLOBALS['a']); 13 } 14} 15 16function returnsVal() { 17 return 42; 18} 19$a = new Test; 20var_dump($a =& returnsVal()); 21 22?> 23--EXPECTF-- 24Notice: Only variables should be assigned by reference in %s on line %d 25int(42) 26