bug78436.phpt 840 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. --TEST--
  2. Bug #78436: Missing addref in SplPriorityQueue EXTR_BOTH mode
  3. --FILE--
  4. <?php
  5. $pq = new SplPriorityQueue();
  6. $pq->insert(new stdClass, 1);
  7. var_dump($pq);
  8. var_dump($pq);
  9. ?>
  10. --EXPECT--
  11. object(SplPriorityQueue)#1 (3) {
  12. ["flags":"SplPriorityQueue":private]=>
  13. int(1)
  14. ["isCorrupted":"SplPriorityQueue":private]=>
  15. bool(false)
  16. ["heap":"SplPriorityQueue":private]=>
  17. array(1) {
  18. [0]=>
  19. array(2) {
  20. ["data"]=>
  21. object(stdClass)#2 (0) {
  22. }
  23. ["priority"]=>
  24. int(1)
  25. }
  26. }
  27. }
  28. object(SplPriorityQueue)#1 (3) {
  29. ["flags":"SplPriorityQueue":private]=>
  30. int(1)
  31. ["isCorrupted":"SplPriorityQueue":private]=>
  32. bool(false)
  33. ["heap":"SplPriorityQueue":private]=>
  34. array(1) {
  35. [0]=>
  36. array(2) {
  37. ["data"]=>
  38. object(stdClass)#2 (0) {
  39. }
  40. ["priority"]=>
  41. int(1)
  42. }
  43. }
  44. }