bug72369.phpt 275 B

12345678910111213141516
  1. --TEST--
  2. Bug #72369 (array_merge() produces references in PHP7)
  3. --FILE--
  4. <?php
  5. $x = 'xxx';
  6. $d = ['test' => &$x];
  7. unset($x);
  8. $a = ['test' => 'yyy'];
  9. $a = array_merge($a, $d);
  10. debug_zval_dump($a);
  11. ?>
  12. --EXPECTF--
  13. array(1) refcount(%d){
  14. ["test"]=>
  15. string(3) "xxx" interned
  16. }